I don't like that this is a boolean, it should be a counter and ajaxActive should return false if the counter is 0. Otherwise, the first ajax request returning will set this to false regardless of whether there is another request running. I seem to remember jQuery having something like this builtin but can't seem to find it at the moment.