Latest web development tutorials

jQuery deferred.always () method

jQuery Misc Methods jQuery Misc Methods

Examples

$ (Function () {$. Get ( "Test.php" ). Always (function () { alert ( "$ .get Method with success and error callback parameter has been completed." );});})

try it"

Definition and Usage

deferred.always () function when the Deferred (delay) when the object is accepted or rejected, add a call handler.

Tip: The parameter may be a function or a function array. Since deferred.always () returns a Deferred object, so you can connect other lingering objects, comprising additional .always methods. When the Deferred object is resolved or denied, the callback function in the order they are added to the execution, and can be passed as a parameter to the use of the following methods: resolve, reject, resolveWith or rejectWith.


grammar

deferred.always( alwaysCallbacks [, alwaysCallbacks ] )

参数 描述
alwaysCallbacks Function类型 一个函数或者函数数组,当Deferred(延迟)对象得到解决或被拒绝时被调用
alwaysCallbacks 可选。Function类型 一个函数或者函数数组,当Deferred(延迟)对象得到解决或被拒绝时被调用


jQuery Misc Methods jQuery Misc Methods