title: How to properly run a spinner until the AJAX request finish?
body: <p>I need to show a spinner with a message while a given AJAX request is going on and should stay there until the call finish. I don't care at all about the return status from the call since I will handle it later on (at the same code) so 404, 500, 200 or any other status is a valid one.</p>
  
  <p>Currently this is how I am handling it:</p>
  
  <pre><code>$(document).bind("ajaxSend", function () {
      load_start('Please wait, we are processing data...');
  }).bind("ajaxComplete", function () {
      load_end();
  });
  </code></pre>
  
  <p>In the case above, for some reason (maybe because what's explained <a href="https://stackoverflow.com/a/4421115/719427">here</a> about the difference between <code>ajaxComplete</code> vs <code>ajaxStop</code> - meaning <code>ajaxComplete</code> means the AJAX call was started successfully) the spinner stop before the call is finished because I am seeing it just running at Chrome Developer Toolbar.</p>
  
  <p>The user then is trying to click the same button again because is not seeing anything on the page and ofc they won't go to the Dev Toolbar to see if the AJAX call still being executed or not.</p>
  
  <p>I did in this way time ago:</p>
  
  <pre><code>$.ajax({
      ...
  }).beforeSend(function () {
      load_start('Please wait, we are processing data...');
  }).always(function(){
      load_end();
  });
  </code></pre>
  
  <p>But I run into the same issues. What would be the right way to handle this? If there is any plugin out there and I need it feel free to recommend it.</p>