Skip to content

Instantly share code, notes, and snippets.

@RolandVels
Last active December 7, 2016 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RolandVels/cf911f4e9cd5f12d19129864778f20ab to your computer and use it in GitHub Desktop.
Save RolandVels/cf911f4e9cd5f12d19129864778f20ab to your computer and use it in GitHub Desktop.
Scroll up button
//Button "Up"
//Documentation:
//http://api.jquery.com/scrolltop/
//http://api.jquery.com/animate/
$("#top").click(function () {
$("body, html").animate({
scrollTop: 0
}, 800);
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment