Skip to content

Instantly share code, notes, and snippets.

@ingowennemaring
Created April 18, 2013 14:16
Show Gist options
  • Save ingowennemaring/5413037 to your computer and use it in GitHub Desktop.
Save ingowennemaring/5413037 to your computer and use it in GitHub Desktop.
Scroll to top of page
$('.goto-top').on(
'click',
function(e){
e.preventDefault();
$('html, body').animate( { scrollTop: 0 } );
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment