Created
February 14, 2018 10:28
-
-
Save Padilo300/318efac49ff3d9a9fc75d97a6a8ba5e8 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
$(document).ready(function() { | |
$("a.scrollto").click(function() { | |
var elementClick = $(this).attr("href") | |
var destination = $(elementClick).offset().top; | |
jQuery("html:not(:animated),body:not(:animated)").animate({ | |
scrollTop: destination | |
}, 800); | |
return false; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment