Skip to content

Instantly share code, notes, and snippets.

@margani
Last active February 10, 2017 09:54
Show Gist options
  • Save margani/8629728 to your computer and use it in GitHub Desktop.
Save margani/8629728 to your computer and use it in GitHub Desktop.
Back to top button
// Back To Top
$('a.top').click(function(){ $('html, body').animate({scrollTop : 0},800); return false; });
//Create an anchor tag
<a class="top" href="#">Back to top</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment