From 89dc1e01435ebeef173c9a843096cd5c1fbc9dd8 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Mon, 13 Jul 2009 22:21:40 +0000 Subject: clearQueue and next should now work with default fx on all browsers --- src/data.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/data.js b/src/data.js index 8714ab9fd..bf54e7526 100644 --- a/src/data.js +++ b/src/data.js @@ -130,11 +130,11 @@ 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){ @@ -143,6 +143,6 @@ jQuery.fn.extend({ }); }, clearQueue: function(type){ - return this.queue( type, [] ); + return this.queue( type || "fx", [] ); } }); \ No newline at end of file -- cgit v1.2.3