Name

scrollIntoView( ) — NN n/a IE 4 DOM n/a

Synopsis

scrollIntoView([showAtTop])

Scrolls the content holding the current element so that the element is brought into view. The default behavior is to display the element so that its top is at the top of the scroll space. But you may also align the element at the bottom of the scroll space, if you prefer.

Returned Value

None.

Parameters

showAtTop

An optional Boolean value. If true (the default), the top of the content is positioned at the top of the scroll space; if false, the bottom of the content is positioned at the bottom of the scroll space.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.