Created
March 14, 2012 09:22
-
-
Save benrolfe/2035335 to your computer and use it in GitHub Desktop.
Smooth Scrolling to anchor tag
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
$('document').ready(function(){ | |
$('a.link').click(function(e) { | |
$('html, body').stop().animate({ | |
scrollTop: $($(this).attr('href')).offset().top | |
}, 1300, 'easeInOutExpo'); | |
e.preventDefault(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See http://blog.unit6websites.com/post/18377774859/smooth-scrolling-to-anchor-tag