scrollIntoView
Scroll element into viewport. https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
Usage
$(selector).scrollIntoView(scrollIntoViewOptions)
Parameters
Name | Type | Details |
---|---|---|
scrollIntoViewOptions optional | object , boolean , undefined | boolean alignToTop or scrollIntoViewOptions object |
Example
it('should demonstrate the scrollIntoView command', () => {
const elem = $('#myElement');
// scroll to specific element
elem.scrollIntoView();
});