Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deferred format doesn't seem to be possible #98

Open
scottopherson opened this issue Sep 5, 2012 · 5 comments
Open

Deferred format doesn't seem to be possible #98

scottopherson opened this issue Sep 5, 2012 · 5 comments
Labels

Comments

@scottopherson
Copy link

When using this plugin, handling animation callbacks using the deferred format doesn't seem to be possible:

$('.elements').animate({ left: '100px' });

$.when( $('.elements') ).done(function( elements ) {
  // all elements are done animating
});
// when animate-enhanced is included the callbacks are fired immediately

The callbacks are fired but they are fired immediately, not when the animation is complete so I'm forced to pass a callback directly to .animate() which doesn't allow the benefits of using deferreds. Disabling the plugin resolves the issue, however, that obviously isn't a desirable solution. I've looked through the source code but haven't grokked it well enough yet to create a solution.

@klimashkin
Copy link

Faced with the same problem. I am forced to postpone the use of your plugin. Sorry.
I'll wait for the version with this fix

@benbarnett
Copy link
Owner

Yeah this will require some new work on the plugin since promises are relatively new in jQuery. I'll look into this when time allows.

@skill83
Copy link

skill83 commented Feb 20, 2013

I faced the problem too. I'll wait also for the next release

@justinbach
Copy link

Also would really like to see support for promises in the next version.

@atanarro
Copy link

atanarro commented Apr 8, 2014

I have added a wrapper plugin to be able to use promises with this library:
https://gist.github.com/atanarro/10145573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants