Skip to content

Instantly share code, notes, and snippets.

@quawn
Last active January 4, 2016 03:19
Show Gist options
  • Save quawn/8560625 to your computer and use it in GitHub Desktop.
Save quawn/8560625 to your computer and use it in GitHub Desktop.
JS: Smooth scrolling to top of page
$("a[href='#top']").click(function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment