Posted By

stancox on 10/22/09


Tagged

html onpage scroling


Versions (?)

Scrolling Content Page


 / Published in: jQuery
 

URL: http://blog.freelancer-id.com/index.php/2009/03/26/scroll-window-smoothly-in-jquery

  1. <!-- HTML -->
  2. <input class="scrollTrigger" type="button" value="Scroll" />
  3.  
  4. //JavaScript
  5. $('.scrollTrigger').click(function(){
  6. $('html, body').animate({
  7. scrollTop: $(".ScrollTarget").offset().top
  8. }, 2000);
  9. });

Report this snippet  

You need to login to post a comment.