Below is my code
var tweetid = '133450847156838400';
$.ajax({
dataType: "jsonp",
url: "http://api.twitter.com/1/statuses/show/"+tweetid+".json?include_entities=1&callback=?",
error:function(xhr, testStatus, error) {
alert("error");
},
success: function(html){
alert("success");
}
});
Chrome console shows me 404 error response but jQuery is not able to trigger the alert.
I added
$(document).ajaxError(function(event, request, settings){
alert('error');
});
nothing happens. Can someone help me in handling this error as I have to detect if this tweet is deleted.