Difference between revisions of "JQuery promise method"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
 
(One intermediate revision by the same user not shown)
Line 13: Line 13:
 
* [[Futures and promises]]
 
* [[Futures and promises]]
 
* [[jQuery Deferred object]]
 
* [[jQuery Deferred object]]
 +
* [[Promise object (JavaScript)]]
  
 
== External links ==
 
== External links ==

Latest revision as of 06:28, 25 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