Skip to content

Instantly share code, notes, and snippets.

@uryu-myao
Created May 21, 2018 07:28
Show Gist options
  • Save uryu-myao/34b18da2511f73b53fb7665bf09d5d0f to your computer and use it in GitHub Desktop.
Save uryu-myao/34b18da2511f73b53fb7665bf09d5d0f to your computer and use it in GitHub Desktop.
smooth back to top
$(function(){
$(".btt").on('click touchstart', function () {
$('html,body').animate({ scrollTop: 0 }, 'swing');
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment