Yes there is, from the jQuery documentation:
$.post("test.php", function(data) {
alert("Data Loaded: " + data);
})
.fail(function() {
alert("error");
})
Update: drake7077: “error is deprecated as of jquery 1.8, use .fail()”
Yes there is, from the jQuery documentation:
$.post("test.php", function(data) {
alert("Data Loaded: " + data);
})
.fail(function() {
alert("error");
})
Update: drake7077: “error is deprecated as of jquery 1.8, use .fail()”