Reputation: 31
http://jsfiddle.net/deswolf/D9X53/ If you play around with this menu for a little bit, you will notice that when your mouse leaves at the top, you get a lot of flickering, which is really annoying. How can I fix this?
Upvotes: 1
Views: 506
Reputation: 31131
The issue you're having happens when you go back to the menu while it's still rolling up. I updated your code to disable the mouseenter
event for 500ms (enough to allow the menu to roll up) and then enable it again. This prevents you from triggering the mouseenter
event (which causes it to roll down) while it's still rolling up.
Upvotes: 1