Received jqXHR object from my $.post
query contains done
function. But I realized that this function returns just its jqXHR object:
$.post(query, function(a,b,jqXHR) {
jqXHR === jqXHR.done() //true
});
How shoud I interpret that?
Received jqXHR object from my $.post
query contains done
function. But I realized that this function returns just its jqXHR object:
$.post(query, function(a,b,jqXHR) {
jqXHR === jqXHR.done() //true
});
How shoud I interpret that?
Copyright © 2021 Jogjafile Inc.
Since
jquery
's ajax call return a Promise, any ofdone()
,fail()
,always()
, andthen()
functions will return thejqXHR
object in order for the Promise to work correctly.More information can be found here:
http://api.jquery.com/jQuery.ajax/#callback-functions