Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

First I'd like to start by saying I'm very new to jquery and pretty new to Javascript as well.

I'm looking to add some jquery/javascript to a css menu to create a delay between options to prevent a the options closing before a user gets to select it. I did some research and found this How to add a delay to CSS Vertical Dropdown Menu

But it seems to do the opposite which delays the opening not the closing of the sub menus.

Here is what I have http://jsfiddle.net/5jd7c/6/

Note that if you try to go directly from set 1 to opt 2 by going diagonally it closes the option and you end up in set 2 instead.

Thank you in Advance.

share|improve this question
add comment

2 Answers

Based on what you've said, I think you want the hoverIntent jQuery plugin. It does exactly what you describe and is very stable.

Much easier than doing it from scratch.

share|improve this answer
 
Thanks for that. That is the functionally I'm trying to get. Now I'm just having a hard time making it actually work. –  It.levon Oct 8 '12 at 20:39
add comment

You need to use the jQuery plugin hoverIntent that mentioned above. I created a quick sample for jsfiddle

I set the delay only on the work menu item, the timeout is 1 second(1000 ms) and i added an id for work li, and id for its ui list

hope that help.

share|improve this answer
 
could this be set to work based on a class instead of an ID? –  It.levon Oct 9 '12 at 4:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.