title: JQuery Ajax Pool
body: <p>Working on a single page application, and I am currently building a JQuery, ajax function for all of my calls to go through. </p>
  
  <p>For a typical page I might have 3 ajax calls. My idea is if a users internet goes out to hold these ajax calls in an array. And then do a timer and keep checking if the user has internet. Once they have internet do the calls. So no calls are run when the user is offline (except for the check for internet one) and once their back online do what they wanted. So in my beforeSend I have this.</p>
  
  <pre><code>beforeSend : function($xhr)
  {
      self.ajaxPool.push($xhr);
  
      if(!self.validateConnection())
      {
          console.log(self.ajaxPool);
      }
  }
  </code></pre>
  
  <p>So my question is when I get connection back, and loop through my array to each <code>$xhr</code> object what function can I call on it to say, 'Hey do what you were supposed to now'? For example <code>$xhr.complete()</code>? I've done a console log on the pool to look at the objects when connection is down but none of the functions it has look like they'd do the trick. </p>