Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Smooth Scrolling for #links
//Smooth scrolling for #links
var $root = $('html, body');
$('a').click(function() {
var href = $.attr(this, 'href');
scrollTop: $(href).offset().top
}, 1000, function () {
window.location.hash = href;
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.