Skip to content

Instantly share code, notes, and snippets.

@GengGao
Created November 25, 2012 04:10
Show Gist options
  • Save GengGao/4142363 to your computer and use it in GitHub Desktop.
Save GengGao/4142363 to your computer and use it in GitHub Desktop.
jQuery: Scroll to Top
$("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