Latest web development tutorials

jQuery deferred.reject () method

jQuery Misc Methods jQuery Misc Methods


Definition and Usage

deferred.reject () function is used to reject delay object and call any failCallbacks callback function according to the given parameters.


Note: 1. The delay is usually only object creator can call the method. You can call deferred.promise (), returns a limited Promise objects to prevent other code changes delayed state of the object or report its status.
2. When the delay object is rejected, any or deferred.fail by deferred.then added failCallbacks, will be called. The callback function in the order they are added to the execution. Passed to deferred.reject () of the args parameter will be passed to each callback function. When the object enters a delay state rejected any failCallbacks is added, it will be executed immediately, and bring to pass .reject () parameters.


grammar

deferred.reject( args )

参数 描述
args Object类型 传递给失败回调函数(failCallbacks)的可选的参数


jQuery Misc Methods jQuery Misc Methods