aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2009-12-22 01:18:49 -0500
committerjeresig <jeresig@gmail.com>2009-12-22 01:18:49 -0500
commitf298cce100c6fe23840ac95e66aaea9cb2bfb447 (patch)
tree6df53cdd21ec09555efbf9b05a808a326fc0696b /src/attributes.js
parent261b7efb5f86a5c9a3de8434f3cad858101e4249 (diff)
downloadjquery-f298cce100c6fe23840ac95e66aaea9cb2bfb447.tar.gz
jquery-f298cce100c6fe23840ac95e66aaea9cb2bfb447.zip
Made sure that the .val() logic for setting radios and checkboxes was correct. Fixes #5698.
Diffstat (limited to 'src/attributes.js')
-rw-r--r--src/attributes.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js
index 91a0fe176..eecf90fa9 100644
--- a/src/attributes.js
+++ b/src/attributes.js
@@ -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);