Skip to content

I.scrollBy() ​

Scrolls the page horizontally and vertically by a given number of pixels.

Usage ​

js
I.scrollBy(x: number, y: number)

Parameters ​

ParameterTypeDescription
xnumberNumber of pixels to scroll right by. Use a negative number to scroll left instead.
ynumberNumber of pixels to scroll down by. Use a negative number to scroll up instead.

Example ​

js
I.scrollBy(200, -500)

Scrolls the page 200 pixels to the right, and 500 pixels up.