eternalistic
5/19/2016 - 6:02 PM

Smooth scroll

Smooth scroll

// Smooth scroll.
Drupal.behaviors.smoothScroll = {
  attach: function(context, settings) {
    $('.scroll').click(function(event) {
      event.preventDefault();
      $('html,body').animate({
        scrollTop: $(this.hash).offset().top
      }, 500);
    });
  }
};