Difference between revisions of "JQuery promise method"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (→External links) |
Karl Jones (Talk | contribs) |
||
Line 17: | Line 17: | ||
* [https://api.jquery.com/promise/ .promise()] @ api.jquery.com | * [https://api.jquery.com/promise/ .promise()] @ api.jquery.com | ||
− | * [https://api.jquery.com/deferred.promise/ deferred.promise()] @ | + | * [https://api.jquery.com/deferred.promise/ deferred.promise()] @ api.jquery.com |
Revision as of 21:34, 24 September 2016
In jQuery, the .promise() method returns a dynamically generated Promise that is resolved once all actions of a certain type bound to the collection, queued or not, have ended.
Description
By default, type is "fx", which means the returned Promise is resolved when all animations of the selected elements have completed.
Resolve context and sole argument is the collection onto which .promise() has been called.
If target is provided, .promise() will attach the methods onto it and then return this object rather than create a new one. This can be useful to attach the Promise behavior to an object that already exists.
See also
External links
- .promise() @ api.jquery.com
- deferred.promise() @ api.jquery.com