I have couple areas with labels. When I hover an area I would like to change the color of the label in that area to be more prominent and fade out the other labels in the areas that I am not hovering over.
How do I do that swap?
$("li").hover(function(){
$(this).find(".label").fadeOut(100);
});
You should pass two functions to
.hover. The first one will be used as a callback to mouseover, the second one to mouseout: