diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-07-13 22:21:40 +0000 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-07-13 22:21:40 +0000 |
commit | 89dc1e01435ebeef173c9a843096cd5c1fbc9dd8 (patch) | |
tree | b7e12e87314b98f36859b2b918960631333f24fb /src | |
parent | 7cfec99858bf397714d3aac1c0ba4708d2ddb986 (diff) | |
download | jquery-89dc1e01435ebeef173c9a843096cd5c1fbc9dd8.tar.gz jquery-89dc1e01435ebeef173c9a843096cd5c1fbc9dd8.zip |
clearQueue and next should now work with default fx on all browsers
Diffstat (limited to 'src')
-rw-r--r-- | src/data.js | 8 |
1 files changed, 4 insertions, 4 deletions
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 |