javascript - Slide Effect happening too many times -


I call this function on-the-homeover and for multiple devices on-house ID, 62, 63, 64,65 ... The function takes effect on slide with slide_it {$ ('# option_' + id). Sleelectogulle ('slow'); }

The problem is that if I move my mouse again and again the mouse has to be mouse-mouse again. If I do this several times, then the slide effect happens at the same time when I pulled my mouse out of the div and, as expected.

But I can not understand how I can do this once ? I can set a variable, but I have several divs used by this function and I can not think of a simple way of doing this instead of storing things in an array, but it is messy!

before you use the call, use it, end the current animation (If any), and since you are chaining, you will start the animation immediately, such as:

  $ ('# options_' + id) .stop (True) .slideToggle ('slow');  

:

When .stop () is said on an element, currently running animation (if any If it is hidden, for example, if an element is being hidden with .slideUp () , then called .stop () , the element is now Will also be displayed, but one part is not called its previous height callback functions. Example: If you move fast and out, I do not wait to finish sliding it, it stops it and as soon as you release the mouse.


Comments