Skip to content

Instantly share code, notes, and snippets.

@zearadoua
Created October 18, 2017 10:04
Show Gist options
  • Save zearadoua/47fccde4252605560de527d9d77025fb to your computer and use it in GitHub Desktop.
Save zearadoua/47fccde4252605560de527d9d77025fb to your computer and use it in GitHub Desktop.
animating go-top
// Animate the scroll to top.
$('.go-top').click(function (event) {
event.preventDefault();
$('html, body').animate({scrollTop: 0}, 300);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment