Smooth Scroll Page When Clicking Anchor Link – jQuery

[ad_1]

Add this to your jQuery file.

// Smooth scroll When Clicking Anchor
// @refer https://stackoverflow.com/a/7717572/8255629
var jQueryroot = $('html, body');
$('a[href^="#"]').click(function () {
  jQueryroot.animate({
    scrollTop: $( $.attr(this, 'href') ).offset().top
  }, 1000);
  return false;
});

[ad_2]

Leave a Reply

Random Post Selection ::

Recent Posts

Unlock Unlimited Downloads