JQuery Ajax JSONP Request not calling timeout
Can anyone tell me why the timeout/error is not being called.
$.ajax({
url: "http://myurl?callback=test",
type: "GET",
dataType: "jsonp",
jsonpCallback: "test",
jsonp: "callback",
timeout: 1000,
success: function(response) { alert(response); },
error: function(x, t, m) {
if(t==="timeout") {
alert("got timeout");
} else {
alert(t);
}
}
});