Last active
June 2, 2017 13:43
-
-
Save YauhenKavalchuk/d07bf0079a49325dfd5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".navigation li").on("click","a", function (event) { | |
event.preventDefault(); | |
var id = $(this).attr('href'), | |
top = $(id).offset().top; | |
$('body,html').animate({scrollTop: top}, 1500); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment