Created
November 8, 2018 19:47
-
-
Save DrewDouglass/e7f1e0a50c0e1a4b7af2bc4058f8adfc to your computer and use it in GitHub Desktop.
Scroll to top - 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
$("a[href='#top']").click(function() { | |
$("html, body").animate({ scrollTop: 0 }, "slow"); //Can replace with milliseconds | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment