aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-05-04 15:53:00 -0400
committertimmywil <tim.willison@thisismedium.com>2011-05-04 15:53:00 -0400
commit5195335cf4df62c06488807ae857f64c2d549253 (patch)
treee73edc443de73b55b9a02f802b2054e318a87d6e /test/unit
parent3ed4b22073767c17c099351637514f5928c0fd68 (diff)
downloadjquery-5195335cf4df62c06488807ae857f64c2d549253.tar.gz
jquery-5195335cf4df62c06488807ae857f64c2d549253.zip
Set the property corresponding to a boolean attribute when setting to true. Fixes #9103.
- Once boolean properties had been modified natively, setting the attribute no longer set the current value
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/attributes.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 80efed829..5f35e9482 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -163,7 +163,8 @@ test("attr(String, Object)", function() {
equals( jQuery("#name").attr("name"), "something", "Set name attribute" );
jQuery("#name").attr("name", null);
equals( jQuery("#name").attr("name"), undefined, "Remove name attribute" );
- jQuery("#check2").attr("checked", true);
+
+ jQuery("#check2").prop("checked", true).prop("checked", false).attr("checked", true);
equals( document.getElementById("check2").checked, true, "Set checked attribute" );
equals( jQuery("#check2").prop("checked"), true, "Set checked attribute" );
equals( jQuery("#check2").attr("checked"), "checked", "Set checked attribute" );