How to scroll to top of page with JavaScript/jQuery?

Cross-browser, pure JavaScript solution:

document.body.scrollTop = document.documentElement.scrollTop = 0;

Leave a Comment