Ajax request in progress jQuery

ajax, javascript, jquery

Solution

You should basically set a variable on top of script set to `false` and on ajax initiate set it to `true` and in the `success` handler set it to `false` again as described here.

Problem

Is there a way to check if there's ajax request in progress? Something like: ``` if ( $.ajax.inProgress ){ do this; } else { do that; } ```

Original source

Related problems