X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=56a2b1f1c5475f3996d4158ee3c8d601b5ae35f1;hb=3a7b09e5c747a9bf1386d667c7abed9630097072;hp=511180a08a58bcedfc58087978f1ae3b1ecb7b00;hpb=9a7652260b7addcf8874bd46926ff92182b500ea;p=jquery.git diff --git a/src/core.js b/src/core.js index 511180a..56a2b1f 100644 --- a/src/core.js +++ b/src/core.js @@ -410,9 +410,7 @@ jQuery.fn = jQuery.prototype = { jQuery.inArray(this.name, value) >= 0); else if ( jQuery.nodeName( this, "select" ) ) { - var values = value.constructor == Array ? - value : - [ value ]; + var values = jQuery.makeArray(value); jQuery( "option", this ).each(function(){ this.selected = (jQuery.inArray( this.value, values ) >= 0 || @@ -774,7 +772,7 @@ jQuery.extend({ ""; }, - // internal only, use is(".class") + // internal only, use hasClass("class") has: function( elem, className ) { return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; }