Returns a Promise object used to observe when all actions of a certain type are bound to the collection, whether they are queued or not.
The .promise() method returns a dynamically generated Promise object that is used to observe when all actions of a certain type are bound to the collection, whether it is queued or not.
By default, type is "fx" , which means that when the selected element has finished all animations, the Promise returned is resolved.
Solve the context and the only parameter is which collection is called to .promise().
If the target is supplied, .promise() will attach to its method and then return this object instead of creating a new one. This is very useful for attaching Promise to an already existing object.
type String V1.6
String to be processed
Object with a promise method
A promise is used on a collection, and no animation is resolved.
var div = $("<div />");
// will fire right awayand alert "true"
alert(this=== div && arg1 === div);