Easy Tutorial
❮ Jquery Plugin Treeview Traversing Prevuntil ❯

jQuery deferred.always() Method

jQuery Miscellaneous Methods

Example

$(function () { 
    $.get( "test.php" ).always(function() {
    alert( "The $.get method with success and error callback parameters has completed." );
});
})

Definition and Usage

The deferred.always() function adds handlers to be called when the Deferred object is either resolved or rejected. Note: The parameter can be a function or an array of functions. Since deferred.always() returns a Deferred object, it can be chained with other Deferred methods, including additional .always methods. When the Deferred object is resolved or rejected, the callback functions are executed in the order they were added, and they can be passed as parameters to methods such as resolve, reject, resolveWith, or rejectWith.


Syntax

Parameter Description
alwaysCallbacks Function type. A function or array of functions to be called when the Deferred object is resolved or rejected.
alwaysCallbacks Optional. Function type. A function or array of functions to be called when the Deferred object is resolved or rejected.

jQuery Miscellaneous Methods

❮ Jquery Plugin Treeview Traversing Prevuntil ❯