Skip to main content

Bug Tracker

Side navigation

#8227 closed enhancement (worksforme)

Opened February 09, 2011 07:43PM UTC

Closed February 11, 2011 05:06PM UTC

Allow me to .stop() specific animations

Reported by: slifty@gmail.com Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.5
Keywords: Cc:
Blocked by: Blocking:
Description

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.

Attachments (0)
Change History (1)

Changed February 11, 2011 05:06PM UTC by jitter comment:1

_comment0: 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 [http://jsfiddle.net/jitter/Egp2G/ test case] to get an idea on how you can accomplish what you want. \ \ Then read all of: \ \ - [http://cdmckay.org/blog/2010/03/01/the-jquery-animate-step-callback-function/ jQuery animate() and the step() callback] \ - [http://api.jquery.com/animate .animate() documentation] \ \ 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. \ \ I hope this helps you out.1297444102238780
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.