(jQuery) mouseover event triggered twice


I have a drop down menu I use and it works well every time i use it. However, on 1 site, i notice it acts extremely strange.

I have attached an isolated example of this dropdown.

When I mouse over the parent of ul.dropdown-menu the drop down is actually displayed but disappears extremely fast after it, even though, my mouse is till on the elements. I tried several experiments and I tried to isolate the drop down to its own file and it actually works beautifully. I tried re-implementing the same script back to the site and disable all other javascript files but the same problem still takes place.

I would like to mention also, that the problem arises when I include the following line:

$('li:has(ul.dropdown-menu)').bind('mouseout',  DropDownMenu_timer);

I would highly appreciate it if someone could let me know what could be causing this, whether its the context stacking order or event being fired twice.

Kind Regards,

Mr. Alexander

How about using one() instead of bind? Or I have done for something like that with mouseenter and mouseleave events on the LI.

No problems. Glad that you found the error and corrected :). We don’t always get it but at least we try :smiley:

Have you tried to change the value in the timeout variable? I assume that you’ve done it because it seems that everything is based on it.


I am really sorry that i bothered you and i feel like an idiot.

After MANY hours spent on this it turns out that… drum roll… i included the javascript file twice…

thank you however for your suggestions and effort to help, i really appreciate it.

looking forward to return a favor,

Mr. Alexander