Last active
December 13, 2017 15:53
-
-
Save paullacey78/83e0e59485d580a0cae8d5f4229de7be 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
<script type="text/javascript"> | |
// Make jQuery WP friendly | |
(function ($) { | |
// Initiate after document loads | |
$( document ).ready(function() { | |
// Custom function | |
jQuery('#content a').click(function(){ | |
jQuery('html, body').animate({ | |
scrollTop: jQuery( jQuery(this).attr('href') ).offset().top | |
}, 400); | |
return false; | |
}); | |
}); | |
})(jQuery); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment