Difference between revisions of "JQuery promise method"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(External links)
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()] @
  
  

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