title: jQuery ajaxStop in ajax success
body: <p>I have a jQuery plugin that i need to implement ajaxStop to a part of it.
  Below is a snippet from my code to show the structure (may not be 100%). </p>
  
  <p>I have shown how my functions are setup as methods in case ajaxStop needs to be implemented as a global function, not sure how I would do that in the current setup.</p>
  
  <p>The problem I'm having is occasionally ajaxStop doesn't get fired even if my ajax response comes back successfully. </p>
  
  <ol>
  <li>Can I call ajaxStop from an ajax success callback?</li>
  <li>What element should I call ajaxStop on
  $().ajaxStop OR $(this).ajaxStop</li>
  </ol>
  
  <p>Thanks very much for any help!</p>
  
  <p>Also perhaps anyone has had trouble with ajaxStop on a Mac?
  I just cannot find a solution to why this doesn't work all the time.</p>
  
  <p>I think ajaxStop is not very reliable :(</p>
  
  <pre><code>(function($) {
  
  $.fn.doRentalButtons = function($params) {
  
      var newMethods = {
  
          startAction:function() {
              var $button = $('a.button');
              $button.click(function(){
                  var params = {one:'something',two:'morethings'}
                  $(this).doAjax(params);
              });
          },
  
          doAjax:function(params) {
  
              $current_button = $(this);
              $container_div = $('#container');
  
              $.ajax({
                 type: 'POST',
                 url: 'whatever.html',
                 data: params,
                 success: function(data) {
                     //dostuff
  
                     var jQueryObject = 
                     if (global_var_hide == 0) {
                         $(this).afterPostRequests($current_button);
                     }
                 }()
              });
          },
  
          afterPostRequests:function($current_button) {
              $().ajaxStop(function(){
                 $(this).show();
                 $(this).positionDiv($current_button);
              });
          }
      };
  
      $.each(newMethods, function(i) {
          $.fn[i] = this;
      });
  };
  
  })(jQuery);
  </code></pre>