$.ajax({
url : 'my_action',
dataType: 'script',
beforeSend : function(xhr, opts){
if(1 == 1) //just an example
{
xhr.abort();
}
},
complete: function(){
console.log('DONE');
}
});
$.ajax({
url : 'my_action',
dataType: 'script',
beforeSend : function(xhr, opts){
if(1 == 1) //just an example
{
xhr.abort();
}
},
complete: function(){
console.log('DONE');
}
});