Window

Window is the standard dom-wrapper for the window elements.

Methods

scrollTo, scrolls, size

top ↑scrollTo

scrollTo(number left, number top) -> window self
scrollTo(Object {x: ..., y:...}) -> window self
scrollTo(Element element) -> window self
scrollTo(String element_id) -> window self

Description

Handles the main scrollbars of the window. Can scroll the window to any position or element.

Example

$(window).scrollTo(123, 123);
$(window).scrollTo({x: 123, y: 123});
$(window).scrollTo($('element'));
$(window).scrollTo('element-id');

top ↑scrolls

scrolls() -> Object {x: NN , y: NN }

Description

Returns the scroll offsets for the window.

Example

$(window).scrolls();

top ↑size

size() -> Object {x: NN , y: NN }

Description

Returns the internal space size of the window.

Example

$(window).size();