jquery core: closes #3541. Added isArray.

This commit is contained in:
Ariel Flesler 2008-10-29 02:01:22 +00:00
parent 77cfd696ec
commit 325755d4b3
3 changed files with 10 additions and 6 deletions

View file

@ -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 );