Scroll position

Enables apps to get and set the scroll position.

Methods

getPosition (callback)

Gets the scroll position relative to the browser viewport

Parameters

NameTypeDescription
callback

function

callback to pass the scroll position

Example

1
AP.scrollPosition.getPosition(function(obj) { console.log(obj); });

setVerticalPosition (y, callback)

Sets the vertical scroll position relative to the iframe

Parameters

NameTypeDescription
y

Number

vertical offset position

callback

function

callback to pass the scroll position

Example

1
AP.scrollPosition.setVerticalPosition(30, function(obj) { console.log(obj); });

Rate this page: