Skip to content

Instantly share code, notes, and snippets.

View raybellis's full-sized avatar

Ray Bellis raybellis

  • Oxfordshire, England
View GitHub Profile
@raybellis
raybellis / jquery.queued.js
Created October 2, 2012 06:45
A jQuery plugin to allow any function to be queued (default 'fx' queue only)
(function($) {
$.fn.queued = function() {
var self = this;
var func = arguments[0];
var args = [].slice.call(arguments, 1);
return this.queue(function() {
$.fn[func].apply(self, args).dequeue();
});
}
}(jQuery));