Created
April 27, 2016 12:43
-
-
Save Burick/685ae238adf316327fb6d689700797c3 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
$('a[href^="#"]').click(function(){ | |
var el = $(this).attr('href'); | |
$('body').animate({ | |
scrollTop: $(el).offset().top}, 2000); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment