$("#v1")
.mouseover(function() {
$("#vc1").fadeIn("slow");
})
.mouseout(function() {
$("#vc1").fadeOut("slow");
});
Might consider using hover, which is essentially mouseenter
and mouseleave
$("#v1")
.hover(
function() {
$("#vc1").fadeIn("slow");
},
function() {
$("#vc1").fadeOut("slow");
});
The difference is that mouseover
and mouseout
will fire when you move into a child element of the element to which the event handler is attached, whereas mouseenter
and mouseleave
a.k.a. hover
won't. This may not be a problem if the element to which you're attaching doesn't have children.