git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Made sure that the .val() logic for setting radios and checkboxes was correct. Fixes...
[jquery.git]
/
src
/
attributes.js
diff --git
a/src/attributes.js
b/src/attributes.js
index
91a0fe1
..
eecf90f
100644
(file)
--- a/
src/attributes.js
+++ b/
src/attributes.js
@@
-158,7
+158,7
@@
jQuery.fn.extend({
}
if ( jQuery.isArray(val) && /radio|checkbox/.test( this.type ) ) {
}
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);
} else if ( jQuery.nodeName( this, "select" ) ) {
var values = jQuery.makeArray(val);