I have a function that runs an ajax call on the change of an input.
But, there is a chance that the function will be fired again before the previous ajax call has co
var currentRequest = null; currentRequest = jQuery.ajax({ type: 'POST', data: 'value=' + text, url: 'AJAX_URL', beforeSend : function() { if(currentRequest != null) { currentRequest.abort(); } }, success: function(data) { // Success }, error:function(e){ // Error } });