Make a change to the image when you hover over the link, not the image:
$(".box a").hover( function() { $(this).find("img.grey").stop().animate({"opacity": "0"}, "slow"); }, function() { $(this).find("img.grey").stop().animate({"opacity": "1"}, "slow"); });
http://jsfiddle.net/BGKFN/28/
Edit
Or simply: http://jsfiddle.net/BGKFN/30/
$(".box a").hover(function( e ) { $(this).find("img.grey").stop().animate({opacity: e.type=="mouseenter"?0:1}, 800); });
where jQuery hover is short for mouseenter mouseleave , which means that if we target the current event e , we get one of two, and using the ternary operator ( ? : ) , which we set the opacity to 0 if true (is mouseenter) and 1 if false (if mouseleave).
source share