jQuery: Get a promise for the end of an animation

Posted . Visible to the public.

The API is a little confusing because animate returns a reference to the element to enable chaining.
But you can do this:

$element.animate(...);
$element.promise().then(function() { ... });
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2015-01-09 10:39)