I am using Jquery to hide show a div. I want to show the div when ‘.microblogpostwrapper’ is hovered and hidden when not hovered. Got the first bit done but can’t get it to hide when not hovered.
$(".microblogpostwrapper").hover(function(){
$(this).find(".microblogpostactions").show();
});
The
.hover()handler will fire once formouseenterand once formouseleave.You can ensure the proper toggle is performed by passing a boolean value to
.toggle():Alternatively, you could pass a second function to
hover()where you would use.hide().