http://mathiasbynens.be/demo/smooth-scrolling
Find all links to anchors in the same document, and make them scroll smoothly when clicked:
$('html').smoothScroll();
Find all links to anchors in the same document inside #content
, and make them scroll smoothly when clicked:
$('#content').smoothScroll();
$('html').smoothScroll(300);
– Mathias