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.
script.aculo.us V1.5 and later.
new Effect.ScrollTo('id_of_element', [options]);
| Option | Description |
| offset | Negative or positive number of pixels as offset to the top of view |
new Effect.ScrollTo('id_of_element', {offset: -24});
Click for Effect.ScrollTo demo