JavaScript

A5.u.elementgetScroll Method

Syntax

A5.u.element.getScroll(element)

Returns

scrollInfoobject

The scroll location and area size.

topnumber

The top (Y) location of the scroll.

leftnumber

The left (X) location of the scroll.

widthnumber

The width of the scrollable content.

heightnumber

The height of the scrollable content.

elementelementstring

A pointer to a DOM element or the ID of an element.

Description

Gets the scroll position of the passed in element.

Example

// assume "id" is the ID of a panel body, and the panel is scroll vertically 200 pixels and the scrollable content is 320 by 1600
var loc = A5.u.element.getScroll(id);
// loc = {top: 200, left: 0, width: 320, height: 1600}