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


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

+3


source







All Articles