Smooth Scrolling for Jumplinks
$('a.jumplink[href^="#"]').on('click', function(event) { | |
event.preventDefault(); | |
var $this = $(this), | |
target = $this.attr('href'); | |
if (target && target !== "#") { | |
$('html, body').animate({ | |
scrollTop: $(target).offset().top | |
}, 600); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment