jquery image hover homepage loop
-
hey.. so i’ve got this jquery hover working on my homepage post loop thumbnails;
https://lucybenson.net/redesign2011/
except when i rollover one image it is applying the effect to all of them. how can i add an identifier to each thumbnail, or solve it in another way?
ANy hints would be so appreciated ??
ps.i’m fairly new to jquery/javascript.javascript function
<script type=’text/javascript’>
jQuery(document).ready(function($){
$(‘.slidethumb’).hover(function() {
$(‘.slidethumb img’).stop(true,true).fadeTo(400, 0.45);
$(‘.slidedesc’).stop(true,true).fadeIn(400);
}, function() {
$(‘.slidethumb img’).stop(true,true).fadeTo(400, 1);
$(‘.slidedesc’).stop(true,true).fadeOut(400);
});
});
</script>homepage code
<div class=”slidethumb”>
<img><?php get_the_image( array( ‘custom_key’ => array( ‘thumbnail’ ), ‘default_size’ => ‘thumbnail’, ‘width’ => ‘310’, ‘height’ => ‘150’ ) ); ?></img>
<div class=”slidedesc”>
<p><?php the_excerpt(); ?></p>
</div></div>
- The topic ‘jquery image hover homepage loop’ is closed to new replies.