git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed #1822 bug where queue() didn't always default to type 'fx'.
[jquery.git]
/
src
/
fx.js
diff --git
a/src/fx.js
b/src/fx.js
index
d5122f1
..
711825f
100644
(file)
--- a/
src/fx.js
+++ b/
src/fx.js
@@
-66,10
+66,10
@@
jQuery.fn.extend({
},
animate: function( prop, speed, easing, callback ) {
},
animate: function( prop, speed, easing, callback ) {
- var opt = jQuery.speed(speed, easing, callback);
+ var optall = jQuery.speed(speed, easing, callback);
- return this[ opt.queue === false ? "each" : "queue" ](function(){
- opt = jQuery.extend({}, opt);
+ return this[ optall.queue === false ? "each" : "queue" ](function(){
+ var opt = jQuery.extend({}, optall);
var hidden = jQuery(this).is(":hidden"), self = this;
for ( var p in prop ) {
var hidden = jQuery(this).is(":hidden"), self = this;
for ( var p in prop ) {
@@
-100,13
+100,13
@@
jQuery.fn.extend({
start = e.cur(true) || 0;
if ( parts ) {
start = e.cur(true) || 0;
if ( parts ) {
- end = parseFloat(parts[2]),
- unit = parts[3] || "px";
+ var end = parseFloat(parts[2]),
+ unit = parts[3] || "px";
// We need to compute starting value
if ( unit != "px" ) {
// We need to compute starting value
if ( unit != "px" ) {
- self.style[ name ] = end + unit;
- start = (end / e.cur(true)) * start;
+ self.style[ name ] = (end || 1) + unit;
+ start = ((end || 1) / e.cur(true)) * start;
self.style[ name ] = start + unit;
}
self.style[ name ] = start + unit;
}
@@
-126,7
+126,7
@@
jQuery.fn.extend({
},
queue: function(type, fn){
},
queue: function(type, fn){
- if ( jQuery.isFunction(type) ) {
+ if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {
fn = type;
type = "fx";
}
fn = type;
type = "fx";
}
@@
-162,6
+162,8
@@
var queue = function( elem, type, array ) {
if ( !elem )
return;
if ( !elem )
return;
+ type = type || "fx";
+
var q = jQuery.data( elem, type + "queue" );
if ( !q || array )
var q = jQuery.data( elem, type + "queue" );
if ( !q || array )
@@
-201,7
+203,8
@@
jQuery.extend({
// Queueing
opt.old = opt.complete;
opt.complete = function(){
// Queueing
opt.old = opt.complete;
opt.complete = function(){
- jQuery(this).dequeue();
+ if ( opt.queue !== false )
+ jQuery(this).dequeue();
if ( jQuery.isFunction( opt.old ) )
opt.old.apply( this );
};
if ( jQuery.isFunction( opt.old ) )
opt.old.apply( this );
};