I have a problem with a set of images. My aim is to show an related-image when you hover a thumbnail, and hide it when you roll out the image. The problem is that I need to put an delay() on the hover beacuse of the design of the module, having 3 columns, it's quite difficult to reach the images in the middle column. This delay makes the hover is queued, showing others images-related to the other thumbs you hovered. This is the markup:
<ul id="module">
<li>
<a href="#">
<img src="thumbnail-image-1.jpg">
<img src="image-1.jpg">
</a>
</li>
<li>
<a href="#">
<img src="thumbnail-image-2.jpg">
<img src="image-2.jpg">
</a>
</li>
...
</ul>
And this is the js:
$('#module li a').each(function(i){
$_imgs = $(this).find('img');
$_imgs.eq(0).mouseover(function() {
$(this).next().delay(800).fadeIn('slow');
});
$_imgs.eq(1).mouseout(function() {
$(this).fadeOut('slow');
});
});
I think that the solution comes from putting an unbind()... Thanks.