jQuery deferred.isRejected()Methods

jQuery 杂项方法jQuery Miscellaneous Methods


Definition and Usage

The deferred.isRejected() function is used to determine whether the Deferred object has been rejected.
Note:1. Deprecated as of jQuery 1.7.Please use deferred.state() instead. If the Deferred object is in the rejected state, it returns true. This means that deferred.reject() or deferred.rejectWith() has been called on the object, and failCallbacks have already been called (or are currently being called).
2. A Deferred object can have three states: pending, resolved, or rejected; use deferred.isResolved() to determine whether the deferred object is in the resolved state.


Syntax

Tip:This method does not accept any parameters.
deferred.isRejected()


jQuery 杂项方法jQuery Miscellaneous Methods

Other Extensions