Skip to content

Instantly share code, notes, and snippets.

@bruth
bruth / jquery-ajax-queue.js
Last active May 3, 2018 06:08
jQuery override to Ajax method to support queuing requests. A deferred object is returned to act as a proxy when the request is actually sent. By default, GET requests are not queued unless the `queue` option is `true`.
(function(root, factory) {
if (typeof define == 'function' && define.amd) {
define(['jquery'], function(jQuery) {
factory(jQuery);
});
} else {
factory(root.jQuery);
}
})(this, function(jQuery) {