Made sure that the .val() logic for setting radios and checkboxes was correct. Fixes #5698.
This commit is contained in:
parent
261b7efb5f
commit
f298cce100
2 changed files with 18 additions and 2 deletions
|
@ -158,7 +158,7 @@ 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue