Bug Tracker

Modify

Ticket #7934 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

$.fn.animate to implement deferreds

Reported by: danheberden Owned by: danheberden
Priority: high Milestone: 1.6
Component: effects Version: git
Keywords: Cc:
Blocking: Blocked by:

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

comment:1 Changed 3 years ago by gnarf

There may be other .fn's that could provide a promise as well like .load()

comment:2 Changed 3 years ago by rwaldron

  • Component changed from unfiled to effects

comment:3 Changed 3 years ago by danheberden

  • Owner set to danheberden
  • Status changed from new to assigned

comment:4 Changed 3 years ago by danheberden

  • Milestone changed from 1.next to 1.6

comment:5 Changed 3 years ago by danheberden

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:6 Changed 3 years ago by danheberden

And a bit more real world example:  http://bit.ly/eW36V7

comment:8 Changed 3 years ago by jaubourg

  • Status changed from assigned to closed
  • Resolution set to fixed

comment:9 Changed 3 years ago by john

  • Priority changed from undecided to high

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.