YouTip LogoYouTip

Misc Deferred Reject

# jQuery deferred.reject() Method [![Image 3: jQuery Misc Methods](#)jQuery Misc Methods](#) * * * ## Definition and Usage The `deferred.reject()` function is used to reject a deferred object and call any failCallbacks based on the given arguments. **Note:** 1. Typically, only the creator of the deferred object can call this method. You can prevent other code from changing the deferred object's state or reporting its state by calling `deferred.promise()`, which returns a restricted Promise object. 2. When a deferred object is rejected, any failCallbacks added via `deferred.then` or `deferred.fail` will be called. Callback functions are executed in the order they were added. The `args` parameter passed to `deferred.reject()` is passed to each callback function. Once the deferred object enters the rejected state, any failCallbacks added later will be executed immediately, with the arguments passed to `.reject()`. * * * ## Syntax deferred.reject( args ) | Parameter | Description | | :--- | :--- | | _args_ | Optional. An object of type Object passed to the failCallbacks. | * * jQuery Misc Methods](#)
← Misc Deferred ResolveMisc Deferred Progress β†’