Jquery Scroll to top of page


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



Copy this code and paste it in your HTML
  1. $(document).ready(function() {
  2.  
  3. $('a[href=#top]').click(function(){
  4. $('html, body').animate({scrollTop:0}, 'slow');
  5. return false;
  6. });
  7.  
  8. });

URL: http://www.electrictoolbox.com/jquery-scroll-top/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.