Created
April 7, 2016 15:19
-
-
Save f1h0/3f53f7ea72fe3dcf6a822ab0b89ede4a 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
jQuery(document).ready(function($) { | |
$('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