Last active
December 18, 2015 03:16
-
-
Save pixelloop/eb9f31a48e79e435d7b7 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
//* Back To Top | |
add_action('wp_footer', 'go_to_top'); | |
function go_to_top() { | |
?> | |
<script type="text/javascript"> | |
jQuery(function($) { | |
$('.backtotop').click(function() { | |
$('html, body').animate({scrollTop:0}, 'slow'); | |
return false; | |
}); | |
}); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment