Return to Snippet

Revision: 33378
at October 8, 2010 07:30 by vagrantradio


Initial Code
$('#someAnchor').click(function() {
	$('html, body').animate({ scrollTop:0 }, 'fast');
	return false;
});

Initial URL


Initial Description
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.

Initial Title
jQuery Easy Page Scroll

Initial Tags


Initial Language
jQuery