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
This commit is contained in:
parent
3ed4b22073
commit
5195335cf4
2 changed files with 8 additions and 3 deletions
|
@ -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" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue