X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fdata.js;h=bf54e752693b767e5aed6eecef53cb6b7271d11b;hb=89dc1e01435ebeef173c9a843096cd5c1fbc9dd8;hp=e429c0de5cf89367667fbad22acff3a947c1d962;hpb=89b4bc53ca0ca3d4e5c80b94ce92b09cc34af8ef;p=jquery.git diff --git a/src/data.js b/src/data.js index e429c0d..bf54e75 100644 --- a/src/data.js +++ b/src/data.js @@ -130,16 +130,19 @@ jQuery.fn.extend({ if ( data === undefined ) return jQuery.queue( this[0], type ); - return this.each(function(){ + return this.each(function(i, elem){ var queue = jQuery.queue( this, type, data ); - if( type == "fx" && queue.length == 1 ) - queue[0].call(this); + if( type == "fx" && queue.length == 1 ) + queue[0].call(this, function() { jQuery(elem).dequeue(type); }); }); }, dequeue: function(type){ return this.each(function(){ jQuery.dequeue( this, type ); }); + }, + clearQueue: function(type){ + return this.queue( type || "fx", [] ); } }); \ No newline at end of file