#7934 closed enhancement (fixed)
$.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.
Change History (9)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Component: | unfiled → effects |
---|
comment:3 Changed 13 years ago by
Owner: | set to danheberden |
---|---|
Status: | new → assigned |
comment:4 Changed 13 years ago by
Milestone: | 1.next → 1.6 |
---|
comment:5 Changed 13 years ago by
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.
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 Changed 12 years ago by
Priority: | undecided → high |
---|
Note: See
TracTickets for help on using
tickets.
There may be other .fn's that could provide a promise as well like
.load()