I'm using the .fadeTo() jQuery effect on the featured images on wordpress. How I have setup the code is that if the mouse hovers over the image, it fades to 0.7, when the mouse leaves, it fades back to 1:
jQuery(function($) {
$(window).load(function() {
$('.image').mouseover(function() {
$('.image').fadeTo('fast', 0.7);
});
$('.image').mouseout(function() {
$('.image').fadeTo('fast', 1);
});
});
});
The class given is ".image" and I have put it in a div within the wordpress loop on the featured image code likes this:
<div class="image"><?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?> <!-- If has featured image, GET --></div>
The problem that I'm running into is that every time I'm hovering over a SINGLE image, it fades ALL images on the page. What I really want is to have it fade the image that my mouse is hovering over, what am I doing wrong?