Skip to content

Instantly share code, notes, and snippets.

View kristian's full-sized avatar

Kristian Kraljic kristian

View GitHub Profile
@kristian
kristian / jQuery.ajaxQueue.js
Last active April 16, 2016 21:15
jQuery Ajax Queue
/*
* jQuery.ajaxQueue - Named queues for ajax requests
*
* (c) 2016 Kristian Kraljic, 2012 Corey Frang
* Dual licensed under the MIT and GPL licenses.
*
* Requires jQuery 1.5+, jQuery.ajaxQueue function, use with (jQuery.ajaxQueue||jQuery.ajax)(sUrl,oOptions,sQueueName).done(function(oData) { ... } ).fail(function() { ... } );
*/
(function(jQuery) {
var mAjaxQueues = {}; // map for all ajaxQueues we are going to create