jQuery Scroll To Top

Sharing is Caring

jQuery is so powerful and very flexible and usually makes so many complex takes so simple.

Anything with a scrollbar and can be selected can be programatically scrolled to to the top.

$(div).scrollTop();

Scrolling to top of browser window is as simple as:

$(window).scrollTop(0);

Author: Brian Cline

Brian is a programmer living in Niagara Falls with ten years of development experience. He is passionate about automation, business process re-engineering, and gamification. For the last six years or so, he has been working with Salesforce and JavaScript.

Related Posts

Sharing is Caring