Created
March 6, 2018 16:39
-
-
Save RuslanHolovko/72252e1a795b52547816f46397ab0c91 to your computer and use it in GitHub Desktop.
scroll page to top
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scroll page to top | |
$('.element').on('click', function(){ | |
$('hmtl, body').animate({ scrollTop : 0 }, 200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment