danyaneh
2/14/2018 - 5:10 AM

jQuery Smooth Scroll

jQuery Smooth Scroll

// Where hash is the target element to scroll to
$('html, body').animate({
  scrollTop: $(hash).offset().top
}, 800, function(){

// Add hash (#) to URL when done scrolling (default click behavior)
  window.location.hash = hash;
});