My JQuery Navigation Menu Slides Up too soon. Help Please.!

I have a navigation menu. Child ul Sliding down when it’s parent li is hovered with the mouse. It also slides up when the mouse exits. However, I am trying to get my first and 2nd sub-menu to delay by 1 second before it slides up. I want the child ul to remain open for 1 second after the mouse leaves. But, it is still sliding up immediately. What’s missing in my code?

Here is the link to my Code.
https://jsfiddle.net/naeemrind/ptbzwrzu/

You just need to add a .delay(1000) before the slideToggle call only when the submenu is open. Hint: the submenu when open has a dispaly: block;

Also, you really don’t need 2 $(document).ready functions, and can combine them into one

1 Like

I see. Thank you
Javascript is hard in the beginning :slight_smile:

Javascript is hard in the beginning :slight_smile:
I see. Thank you