Created
November 6, 2015 00:48
-
-
Save EvanHerman/0ba6f892902a39bbf80f to your computer and use it in GitHub Desktop.
jQuery smooth scroll to an element in the dom (without third party plugin)
This file contains hidden or 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
jQuery( 'html, body' ).animate({ | |
scrollTop: jQuery( "#elementtoScrollToID" ).offset().top | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment