Scroll page view to element. This method does NOT scroll a HTML DIV element with overflow scroll to visible. It always scrolls the main window.

Availability

script.aculo.us V1.5 and later.

Syntax


  new Effect.ScrollTo('id_of_element', [options]);

Effect-specific parameters

Option Description
offset Negative or positive number of pixels as offset to the top of view

Example


  new Effect.ScrollTo('id_of_element', {offset: -24});
Click for Effect.ScrollTo demo