Scroll to div using JQuery Animate

Here is the small piece of code, which you can use
$("#scroll-btn").click(function (){
  $('html, body').animate({
    scrollTop: $(".area").offset().top
    }, 800);
  return false;
});

Comments

Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Difference between Validations, Callbacks and Observers