scrollTo

scrollTo(element) -> HTMLElement

Scrolls the window so that element appears at the top of the viewport. Returns element.

This has a similar effect than what would be achieved using HTML anchors (except the browser’s history is not modified).

Example


$(element).scrollTo();
// -> HTMLElement