Section 25.167. HTMLElement.scrollIntoView( ): make an element visible


25.167. HTMLElement.scrollIntoView( ): make an element visible

Firefox 1.0, IE 4, Safari 2.02, Opera 8.5

25.167.1. Synopsis

 element.scrollIntoView(top) 

25.167.1.1. Arguments

top

An optional boolean argument that specifies whether the element should be scrolled to the top (true) or bottom (false) of the screen. This argument is not supported by all browsers, and elements near the top or bottom of a document cannot usually be scrolled to the opposite edge of the window, so this argument should be considered only a hint.

25.167.2. Description

If an HTML element is not currently visible in the window, this method scrolls the document so that it becomes visible. The top argument is an optional hint about whether the element should be scrolled to the top or bottom of the window. For elements that accept the keyboard focus, such as the Link and Input elements, the focus( ) method implicitly performs this same scroll-into-view operation.

25.167.3. See Also

Anchor.focus( ), Input.focus( ), Link.focus( ), Window.scrollTo( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net