Scroll till top position is 0

   $('html, body').animate({scrollTop:0}, 'slow');

Scroll till top position is 100

   $('html, body').animate({scrollTop:100}, 'slow');

Scroll takes 2 seconds to complete

   $('html, body').animate({scrollTop:100}, 2000);

Leave a reply