Q:

jquery scroll to element

$('html, body').animate({
  scrollTop: $("#grepperRocks").offset().top
});
8
  $('html, body').animate(
    {
      scrollTop: $($(this).attr('href')).offset().top,
    },
    500,
    'linear'
  )
1
document.getElementById("divId").scrollIntoView();
3
$("#button").click(function() {
    $([document.documentElement, document.body]).animate({
        scrollTop: $("#elementtoScrollToID").offset().top
    }, 2000);
});
1

New to Communities?

Join the community