Could you do something like this?

if(!$('#myElem:animated')){
     <!-- Animation code here -->
}

You can read more information about the animated selector here;

http://docs.jquery.com/Selectors/animated


On Jun 22, 8:47 pm, anthonyb <[EMAIL PROTECTED]> wrote:
> Im somewhat new to using jQuery and I am loving it so far. One problem
> that I encounter is if you have a element, say, for example, that is a
> button and on press a paragraph of text fades in. If you press the
> button again, jQuery fades the text out.
>
> Well this in fact works rather well, but the problem is, if you go
> crazy on that button and press it rapidly with your mouse, the
> animation will just open and close and open and close.. is there any
> way to prevent this from happening?
>
> Essentially it would be great if there was something that said: If the
> animation is in motion, dont take any other commands for it. Or
> something along those lines.
>
> Again, im somewhat new at this, so I hope I'm being clear with what I
> am encountering. Thanks.

Reply via email to