jQuery(document).ready(function($){
  $('a[href*="#"]').on('click', function(e) {
    if($($(this).attr('href')).length > 0) {
      e.preventDefault()
      $('html, body').animate(
        {
          scrollTop: $($(this).attr('href')).offset().top,
        },
        500,
        'linear'
      )
    }
  })
});

Leave a Reply

Your email address will not be published. Required fields are marked *