This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

scrollTo

Summary

Scrolls the window to the specified x- and y-offset.

Method of dom/Windowdom/Window

Syntax

 window.scrollTo(/* see parameter list */);

Parameters

x

Data-type
Number

Integer that specifies the horizontal scroll offset, in pixels.

y

Data-type
Number

Integer that specifies the vertical scroll offset, in pixels.

Return Value

No return value

Examples

window.scrollTo( 0, 1000 );

Notes

Remarks

The specified offsets are relative to the upper-left corner of the window.

Attributions