Reputation: 11
when i mouse out from a ul li, i want to hide the dropdown ul what i w'll do
Upvotes: 1
Views: 474
Reputation: 63512
This is what I think you meant:
you can use a combination of the hover() event and the toggle() event
$("ul").hover(
function(){ $("li", this).toggle(); }
);
But if you literally meant hiding the ul after mouseout of the li then try this:
$("ul li").mouseout(
function(){ $(this).closest("ul").hide(); }
);
Upvotes: 1