I use $ .get, $ .post and $ .getJSON extensively, so I wanted to see how .ajaxError works. I tried this ...
$(document).ajaxError(function (e, xhr, options, error)
{
console.log(e);
console.log(xhr);
console.log(options);
console.log(error);
});
and I also tried to put it in mine $(document).ready().. And then I disconnected the network connection. AJAX made a lot of errors POST(because they received unexpected answers), and GETreturned instantly (cached), but nothing appeared in Firebug, as if ajaxError had never been called, What am I doing wrong? I just tried again without console logs and simply alert('foo'), and again nothing happened. Many errors, but ajaxError never fires.
source
share