This is a simple way to scroll to the top of the page, when an anchor tag has been clicked. Note that we must "return false," in order to disable the default browser action.
$('#someAnchor').click(function() { $('html, body').animate({ scrollTop:0 }, 'fast'); return false; });
Comments
Subscribe to comments
You need to login to post a comment.

Excellent... thanks!
Excellent... thanks!