scrollIntoView
Scroll element into viewport (MDN Reference).
Usage
$(selector).scrollIntoView({ })
Parameters
Name | Type | Details |
---|---|---|
scrollIntoViewOptions optional | object, boolean | options for Element.scrollIntoView() (default: true ) |
Example
it('should demonstrate the scrollIntoView command', () => {
const elem = $('#myElement');
// scroll to specific element
elem.scrollIntoView();
});