var ajax = $.ajax({
method: "GET",
url: "api/fichas",
dataType: "json",
success: function( strData ){
alert("work");
$("#agenda .content").append(strData);
}
}).done(function(){
console.log("WORK");
});
I have this code in a button, it makes the request but does not show anything, neither an error nor that it is already done (the .done() function)
The response
api/fichas
should be in JSON format, if it finds errors in the content and it is not of type json, the response functionsuccess
will.done()
not be called, instead it would call .fail()