Slide to top of page


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

Slide / scroll to the top of the page.


Copy this code and paste it in your HTML
  1. //scroll to top of screen
  2. $('html').animate({scrollTop:0}, 'slow'); //for most browsers
  3. $('body').animate({scrollTop:0}, 'slow'); //for webkit

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.