Scrolling Content Page


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



Copy this code and paste it in your HTML
  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. });

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.