X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fattributes.js;h=eecf90fa90024f2c018b0e597331069ffbadbe55;hb=f298cce100c6fe23840ac95e66aaea9cb2bfb447;hp=787c6bbe4178f399cfea88d3059eb41d025b3b86;hpb=3776cbe314ac6f5081e998c3d5ac84d3fbc51872;p=jquery.git diff --git a/src/attributes.js b/src/attributes.js index 787c6bb..eecf90f 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -158,13 +158,13 @@ jQuery.fn.extend({ } if ( jQuery.isArray(val) && /radio|checkbox/.test( this.type ) ) { - this.checked = jQuery.inArray(this.value || this.name, val) >= 0; + this.checked = jQuery.inArray( this.value, val ) >= 0; } else if ( jQuery.nodeName( this, "select" ) ) { var values = jQuery.makeArray(val); jQuery( "option", this ).each(function() { - this.selected = jQuery.inArray( this.value || this.text, values ) >= 0; + this.selected = jQuery.inArray( this.value, values ) >= 0; }); if ( !values.length ) {