title: Modifying jQuery $.ajax() success method during request
body: <p>In the web app I am working on there is potential for very long running ajax queries.</p>
  
  <p>I'm using jQuery's $.ajax method to do something like:</p>
  
  <pre><code>this._xhr = jQuery.ajax({
      type: "GET",
      url: "/path/to/service",
      data: "name=value",
      success: function(data, message){
          // handle a success
      },
      dataType: "json"
  });
  </code></pre>
  
  <p>Is there a way to modify the success callback after this._xhr.readyState = 2 (loaded) and before this._xhr.readyState = 4 (completed)</p>
  
  <p>I tried modifying this._xhr.onreadystatechange but found that jQuery does not define onreadystatechange.</p>