Return to Snippet

Revision: 40615
at February 4, 2011 08:51 by ksnagra


Initial Code
function scroll_to(div){
	$('html, body').animate({
		scrollTop: $(div).offset().top
	},1000);
}

Initial URL
http://www.ksnagra.com/examples/jquery/page-scroll-to-anchor-tag/

Initial Description
This function allows you to pass any div anchor tag as a parameter to scroll to. You can easily add easing after the 'duration' parameter in the jQuery animation function.

Initial Title
jQuery animated page scroll to anchor tag function

Initial Tags
page, jquery, animation

Initial Language
jQuery