-
-
Save codingwithsara/2843d80390563b812005680c95f33890 to your computer and use it in GitHub Desktop.
jQuery ScrollTop-4
This file contains 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
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> | |
<script> | |
$(function(){ | |
$('#scroll').click(function(){ | |
$('html, body').animate({scrollTop:0}, 'slow'); | |
return false; | |
}); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment