Skip to content

Instantly share code, notes, and snippets.

@benrolfe
Created March 14, 2012 09:22
Show Gist options
  • Save benrolfe/2035335 to your computer and use it in GitHub Desktop.
Save benrolfe/2035335 to your computer and use it in GitHub Desktop.
Smooth Scrolling to anchor tag
$('document').ready(function(){
$('a.link').click(function(e) {
$('html, body').stop().animate({
scrollTop: $($(this).attr('href')).offset().top
}, 1300, 'easeInOutExpo');
e.preventDefault();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment