Skip to content

Instantly share code, notes, and snippets.

@hassox
Forked from chrislloyd/mock_ajax.js
Created December 1, 2009 05:36
Show Gist options
  • Select an option

  • Save hassox/246096 to your computer and use it in GitHub Desktop.

Select an option

Save hassox/246096 to your computer and use it in GitHub Desktop.
(function(){
var original_ajax = jQuery.ajax;
jQuery.ajax = function(opts){
var self = this;
return setTimeout(function(){
original_ajax.call(self, opts);
}, 2000);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment