Skip to content

Instantly share code, notes, and snippets.

@ascot21
Created November 29, 2012 19:37
Show Gist options
  • Save ascot21/4171325 to your computer and use it in GitHub Desktop.
Save ascot21/4171325 to your computer and use it in GitHub Desktop.
jQuery Easing One-Page
$('nav ul li a').bind('click',function(event){
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anchor.attr('href')).offset().top)-80
}, 1500,'easeInOutExpo');
event.preventDefault();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment