title: Remove Jquery AJAX callback functions
body: <p>I am creating an overlay window that has  a questionary in it with some input=text fields. Once it is submitted, I am using AJAX (jquery) to send the data/receive the result from the server. The problem is that the user can basically close this overlay anytime, without submitting, while submitting, processing the result, etc. In jquery's documentation this is how a possible ajax call may look like:</p>
  
  <pre><code>var jqxhr = $.ajax( "example.php" )
  .done(function() {
    alert( "success" );
  })
  .fail(function() {
    alert( "error" );
  })
  .always(function() {
    alert( "complete" );
  });
  </code></pre>
  
  <p>That's all great but considering the results (error, success, complete) may arrive at the time that the overlay is not visible anymore, I would need to remove the listeners/callbacks so they don't fire once the overlay window is closed. Any advices how I can achieve that? Setting nulls, off/unbind, etc doesn't seem to make any change. How would I go unbinding it? Thanks a  lot!</p>