Created
April 17, 2016 17:20
-
-
Save rdbox/4433cdf0f9310bcd57fb5edcbdfeb799 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