Line 750: | Line 750: | ||
window.location.hash = hash; | window.location.hash = hash; | ||
// Using jQuery's animate() method to add smooth page scroll | // Using jQuery's animate() method to add smooth page scroll | ||
− | // The optional number ( | + | // The optional number (100) specifies the number of milliseconds it takes to scroll to the specified area |
$('html, body').animate({ | $('html, body').animate({ | ||
scrollTop: $(hash).offset() .top -100 | scrollTop: $(hash).offset() .top -100 | ||
− | }, | + | }, 100, function(){ |
Revision as of 07:45, 19 October 2019