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