Skip to content

Instantly share code, notes, and snippets.

@jwaldimer
Created October 27, 2016 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwaldimer/d43af9f7ea8e78bce20213beecbfbbe8 to your computer and use it in GitHub Desktop.
Save jwaldimer/d43af9f7ea8e78bce20213beecbfbbe8 to your computer and use it in GitHub Desktop.
scrool with delay effect to section with class .page-scroll in page
$(function() {
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top
}, 2500, 'easeInOutExpo');
event.preventDefault();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment