Last active
December 19, 2017 08:58
-
-
Save chy4egg/7c5ae87265dc9597facca9308c8e3217 to your computer and use it in GitHub Desktop.
jQuery Smooth Scroll
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^="#"]').on("click", function(){ | |
var the_id = $(this).attr("href"); | |
$('html, body').animate({ | |
scrollTop:$(the_id).offset().top | |
}, 'slow'); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment