Skip to content

Instantly share code, notes, and snippets.

@johnbocook
Last active January 4, 2016 03:39
Show Gist options
  • Select an option

  • Save johnbocook/8563302 to your computer and use it in GitHub Desktop.

Select an option

Save johnbocook/8563302 to your computer and use it in GitHub Desktop.
jQuery Back to top button
// Back To Top
$('a.top').click(function(){
$(document.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