Skip to content

jQuery:Animated Scroll Back to Top

this example of jQuery snippet for animated scroll-up

<a href=”#”>Back to Top</a>

<script>
$(document).ready(function(){
$(‘#do-nothing’).click(function(e) {
$(‘body,html’).animate({“scrollTop”:0},’slow’);

});
});
</script>

Share