scroll

Scroll to a specific element. You can also append/pass two offset values as parameter to scroll to a specific position.

Usage

1
client.scroll([selector],xoffset,yoffset).then(callback);

Parameters

Param Type Details
selector
optional
String element to scroll to
xoffset Number x offset to scroll to
yoffset Number y offset to scroll to

Example

scroll.js
1
2
3
4
5
6
7
8
9
10
11
client
// scroll to specific element
.scroll('#myElement')

// scroll to specific element with offset
// scroll offset will be added to elements position
.scroll('#myElement', 100, 100)

// scroll to specific x and y position
.scroll(0, 250)
.end();

Uses