2020-04-06

jQuery - Scroll to first element of a given class or selector

$('html, body').animate(
  {
    scrollTop: $('CSS_SELECTOR').first().offset().top
  }
  , 750
);

No comments:

Post a Comment