jquery core: closes #3541. Added isArray.
[jquery.git] / src / fx.js
index 8cb7b99..cbf067f 100644 (file)
--- a/src/fx.js
+++ b/src/fx.js
@@ -112,7 +112,7 @@ jQuery.fn.extend({
        },
 
        queue: function(type, fn){
-               if ( jQuery.isFunction(type) || ( type && type.constructor == Array )) {
+               if ( jQuery.isFunction(type) || jQuery.isArray(type) ) {
                        fn = type;
                        type = "fx";
                }
@@ -121,7 +121,7 @@ jQuery.fn.extend({
                        return queue( this[0], type );
 
                return this.each(function(){
-                       if ( fn.constructor == Array )
+                       if ( jQuery.isArray(fn) )
                                queue(this, type, fn);
                        else {
                                queue(this, type).push( fn );
@@ -208,7 +208,7 @@ jQuery.extend({
                        easing: fn && easing || easing && easing.constructor != Function && easing
                };
 
-               opt.duration = typeof opt.duration == 'number' ? opt.duration :
+               opt.duration = jQuery.fx.off ? 0 : typeof opt.duration == 'number' ? opt.duration :
                        jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
 
                // Queueing