Created
February 29, 2012 11:23
-
-
Save rubensanroman/1940181 to your computer and use it in GitHub Desktop.
Vertical Scrolling with jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('ul.nav a').bind('click',function(event){ | |
var $anchor = $(this); | |
$('html, body').stop().animate({ | |
scrollTop: $($anchor.attr('href')).offset().top | |
}, 1000); | |
event.preventDefault(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment