i have a dropdown menu here and i have the problem that sometimes it won't close if you move too fast over it.
Try it here with fast mouse moves from top to bottom over the menu.
On the web page i'm working on, the menu (and the main content) are within an iframe and my attempt to solve this problem was an "mouse catcher" div in the parent frame.
I bound a mouseover event to the "mouse catcher" div where i call closeSubNavi() in the frame.
I tried to simulate this state here.
It works fine in jsfiddle but not in real life.
There the call of closeSubNavi() from the parent frame continuously catches the just opening submenu in the state of the fadeIn() animation.
It closes it, but when i open the submenu again, it can be half-transparent or even completely invisible.
How to solve this? Edit: the above is solved. Nevertheless the following still interests me
Is there something in jQuery like synchronized in Java?
Maybe something like a queque where you can add commands, wich are processed consecutively?
Yes, there is queueing and dequeing of functions. It is mostly used for the animation engine but can be used for just about anything. See the documentation for the .queue() and .dequeue() methods. (Or the end of Chapter 5 of jQuery in Action, 2nd Edition if you have access to a copy.)
Ah! That's the third printing of the second edition. It just means that they ran out of books from the first and second print runs and needed to print more. (When that happens, we have the opportunity to make minor changes that won't affect page flow).
Thanks for buying the book -- maybe it will get to a fourth printing!