Created
November 28, 2011 22:07
-
-
Save shawnsandy/1402304 to your computer and use it in GitHub Desktop.
Adds jquery hoverizr to wordpress
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
<?php | |
function theme_scripts(){ | |
wp_register_script('hoverizer', get_template_directory_uri() . '/library/hoverizer/jquery.hoverizr.min.js', array('jquery')); | |
wp_enqueue_script('hoverizer'); | |
} | |
function cwp_theme_footer(){ | |
?> | |
<script type="text/javascript"> | |
jQuery.noConflict(true); | |
jQuery('.attachment-themes-thumbnail').hoverizr(); | |
</script> | |
<?php | |
} | |
add_action('wp_footer', 'cwp_theme_footer'); | |
add_action('wp_enqueue_scripts', 'theme_scripts'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment