What are the parameters sent. Always in jQuery?
I can't find any documentation on what the parameters are for the method . always()
Right now I just use:
$.post("foo.do", {
...
}, function(data) {
...
}).fail(function(jqXHR, textStatus, errorThrown) {
...
}).always(function() {
...
});
+3
Paul vargas
source
to share
1 answer
The documentation is in the jqXHR section of the $ .ajax entry . 1
The parameters are as follows:
jqXHR.always(function( data|jqXHR, textStatus, jqXHR|errorThrown ) { });
-
If an error occurs:
jqXHR.always(function( jqXHR, textStatus, errorThrown ) { });
-
Otherwise:
jqXHR.always(function( data, textStatus, jqXHR ) { });
Notes
- Thanks to Mike's comment .
+3
Paul vargas
source
to share