jquery scroll to anchor
The following script scrolls on klick on an tag called “#anchor” to an tag with the attribute name=”anchor”.
$("a[href^='#']").click(function() { $('html,body').stop().animate({ scrollTop: $("a[name^='"+$(this).attr("href").substr(1)+"']") .offset().top},1500); return false; })