So basically I am trying to have div.show fade in on hover and then when you stop hovering, have it fade back to an opacity of 0.
However, I cannot get the div to fade back to 0 when you stop hovering.
Here is my code:
$(document).ready(function(){
$("div.post.photo").live('hover', function() {
$(this).children("div.show").fadeTo("slow", .7);
}, function(){
$(this).children("div.show").fadeTo("slow", 0);
});
});
Thank you
I am pretty sure you should be fading it back to 1, not 0.
Also
live()only takes one handler. You need to append mouse out event separately.fiddle