Created
May 4, 2012 18:02
-
-
Save technosailor/2596610 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
class Fun_Stuff { | |
function __construct() | |
{ | |
$this->hooks(); | |
} | |
function hooks() | |
{ | |
add_action( 'wp_head', array( $this, 'css' ) ); | |
add_action( 'wp_head', array( $this, 'js' ) ); | |
} | |
function js() | |
{ | |
wp_enqueue_script( 'jquery' ); | |
wp_print_scripts(); | |
?> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery('.entry-content img').hover( | |
function(){ | |
jQuery(this).addClass('largerthanlife'); | |
}, | |
function(){ | |
jQuery(this).removeClass('largerthanlife'); | |
}); | |
}); | |
</script> | |
<?php | |
} | |
function css() | |
{ | |
?> | |
<style> | |
.largerthanlife { width: 500px; height: 300px; } | |
</style> | |
<?php | |
} | |
} | |
$whattawhat = new Fun_Stuff; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment