Thanks a lot for your reply, Karl!
Yeah, I'm aware about the callback option on the function but this
would not be the ideal solution in my case. I want to stop all my code
from being executed while the animation is running, not only a portion
of it. And the only way I thought about it was using a flag that would
be setted inside the callback. Not the ideal solution, for sure. But
if there's no other way around this, I guess I'll have to go this way,
then. :~p
Thanks again.
On 28 nov, 12:22, Karl Swedberg <[EMAIL PROTECTED]> wrote:
> Hey there,
>
> the last argument for .animate is a callback function that will start
> only when the animation is finished. For example:
>
> $("p").animate({"height": "toggle", "opacity": "toggle"}, "slow",
> function() {
> alert('animation is finished');
>
> });
>