I have two ajax calls that executes some callback after both of them get completed using jQuery.when()
$.when(loadDataA(), loadDataB()).done(function(dataA, dataB) {
console.log(xhr.status); // How do I get the xhr.status?
}
I want to know the xhr.status
of the first call. With the normal .done() you can do something like:
.done(function(data, statusText, xhr) {
console.log(xhr.status);
}
But I can not make it work in my case.
How do I get it when using jQuery.when
?