Hey Christian,

This is either a huge co-incidence or we are probably born on the same date
and time... coz, i spent the full day yesterday to figure out exactly this
and was jumping for joy that i found the simplest and the easiest way to
stop animation and i started incorporating them into the jkwick and lavalamp
plugin that i was working on...

I just wish u saved me all the hardwork by sending this message on
wednesday....

Anyways, even though i thought i found the solution, i wasnt confident if
that was the right solution, but now u confirmed it, and thanks a ton.

When i whip out a small utility plugin outta this, i will be glad to add you
as co-author. ;-)

-GTG

On 8/17/07, Cybolic <[EMAIL PROTECTED]> wrote:
>
>
> You can start and stop an animation like so:
>
> // start
> $('#animationElement').animate({width: 50}, slow);
>
> // stop
> $.dequeue($('#animationElement').get(0), "fx");
>
>
> You can of course define a helper for it like so:
>
> $.fn.stop = function(){
>    this.each(function(){
>        $.dequeue(this, "fx");
>    });
>    return this;
> };
>
> - now you can just do: $('#animationElement').stop();
>
>
> This should really be added to the documentation, or given a shortcut.
> If anyone would do this, or tell me how to do it, that'd be great.
>
> Cheers,
> Christian Dannie
>
> On Aug 4, 6:40 am, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote:
> > hi friends,
> >
> > is there a way to stop an animation after it has started? any hack that
> will
> > make this happen will be useful...
> >
> > thanks in advance,
> > -GTG
>
>

Reply via email to