Created
September 27, 2013 17:33
-
-
Save mgirouard/6732102 to your computer and use it in GitHub Desktop.
How to animate a scroll to an element on a page, without a plugin
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
// via http://stackoverflow.com/questions/6677035/jquery-scroll-to-element | |
$('html,body').animate({ scrollTop: $('#target').offset().top }, 500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment