Side navigation
#7934 closed enhancement (fixed)
Opened January 10, 2011 07:04AM UTC
Closed April 13, 2011 01:45PM UTC
Last modified March 19, 2012 09:22PM UTC
$.fn.animate to implement deferreds
Reported by: | danheberden | Owned by: | danheberden |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | effects | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Spoke with gnarf about this, our idea is to have the lastPromise available on the collection for animate, so:
$elements.animate( properties ).promise().then( function() { /* gets called when ALL animations are complete */ });
In this case, using with $.when would probably be the most advised route:
$.when( $elements.animate( properties ) ).then( fn );
The benefit would not only be for that particular animation set, but building a collection of them as well and being able to .then( fn ) once they are all done.
Attachments (0)
Change History (9)
Changed January 10, 2011 07:06AM UTC by comment:1
Changed January 18, 2011 01:39PM UTC by comment:2
component: | unfiled → effects |
---|
Changed January 18, 2011 09:53PM UTC by comment:3
owner: | → danheberden |
---|---|
status: | new → assigned |
Changed January 18, 2011 09:54PM UTC by comment:4
milestone: | 1.next → 1.6 |
---|
Changed February 13, 2011 08:09AM UTC by comment:5
Since Addy was asking about it, I made a better "what the hell do I mean" fiddle:
http://jsfiddle.net/danheberden/4upzp/
Of course, this only uses the newer method signature but hopefully illustrates the point.
Changed February 13, 2011 07:07PM UTC by comment:6
And a bit more real world example: http://bit.ly/eW36V7
Changed March 11, 2011 06:19PM UTC by comment:7
Changed April 13, 2011 01:45PM UTC by comment:8
resolution: | → fixed |
---|---|
status: | assigned → closed |
Changed April 23, 2011 06:11PM UTC by comment:9
priority: | undecided → high |
---|
There may be other .fn's that could provide a promise as well like