1

when i mouse out from a ul li, i want to hide the dropdown ul what i w'll do

1 Answer 1

1

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(); }
);
Sign up to request clarification or add additional context in comments.

2 Comments

I would think s/he meant hiding the "li" as well b/c hiding the ul will also hide the menu.
@nolabel right... which seems a little odd, but who knows what it's for

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.