The problem:
A loading message will appear when ajax request start:
$('#container').ajaxStart(function(){ showFlashMessage(); })
And will disappear after ajax request stops:
$('#container').ajaxStart(function(){ $('#flashMessage').remove(); })
Now I want to escape(ignore) the ajaxStart event after 3 ajax requests sent.
What I tried:
I tried following codes, but neither works:(
$('#container').ajaxStart(function(){})
or
$('#container').ajaxStop(function(){ $('#flashMessage').remove(); })
Question
How can I escape (ignore) the ajaxStart event?
Use a global counter variable.