Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8227 closed enhancement (worksforme)

Allow me to .stop() specific animations

Reported by: [email protected] Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.5
Keywords: Cc:
Blocked by: Blocking:


I can create more than one animation on one object -- e.g. one for 'width' and one for 'top' -- to change more than one attribute of an object at the same time.

If I want to "stop()" one of those animations, I have to stop all of them; this is not ideal! I would like to be able to say something like .stop('width') to stop the width animation without stopping the 'top' animation.

I can provide more details about the potential use case.

Change History (1)

comment:1 Changed 12 years ago by jitter

Component: unfiledeffects
Priority: undecidedlow
Resolution: worksforme
Status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing an enhancement request! This idea sounds interesting and although it's already possible to do this, you might want to add this request to one of the more "general improvements for animate" tickets like #7747 and #7974 .

First take a look at this test case to get an idea on how you can accomplish what you want.

Then read all of:

And finally: Use this with caution! Although this works with the current jQuery version (and probably with older ones too) this samples relies on functions / properties which aren't documented all too well (so AFAIAC only semi-official) and thus might be subject to change/removal/subtle modification in behavior in future versions of jQuery. Also you better should know exactly what you are doing, what you aim for and who/why this sample works to make sure this doesn't produce unwanted side-effects in your code.

I hope this helps you out.

Last edited 12 years ago by jitter (previous) (diff)
Note: See TracTickets for help on using tickets.