Go to top of the page, smoothly


/ Published in: jQuery
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $( 'html, body' ).animate( { scrollTop: 0 }, 0 );
  2.  
  3. //smooth scrolling
  4. $( 'html, body' ).animate( { scrollTop: 0 }, 'slow' );

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.