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

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.