Skip to content

Instantly share code, notes, and snippets.

@fiximportant
Created September 7, 2018 14:42
Show Gist options
  • Save fiximportant/86af3d62ce4b82900e1df4153b62e403 to your computer and use it in GitHub Desktop.
Save fiximportant/86af3d62ce4b82900e1df4153b62e403 to your computer and use it in GitHub Desktop.
Smoth Scroll Anchors
//SMOTH SCROLL MENU
$('.sp-megamenu-parent > li > a').click(function(){
$('html, body').animate({
scrollTop: $( $.attr(this, 'href') ).offset().top - 59 /* Minus 59 pixels */
}, 500);
return false;
});
//END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment