Side navigation
#14300 closed bug (duplicate)
Opened August 26, 2013 06:59AM UTC
Closed August 26, 2013 01:44PM UTC
it has not effect use attr to change a checkbox after second times
Reported by: | aiqunfang@163.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
the following code has effect in 1.8.3, but has not effect in 1.9.1 and 1.10.2.
A copy of code at http://jsfiddle.net/WyVaS/.
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="jquery-1.8.3.js"></script> <script type="text/javascript"> $(function () { $("#checkA").attr({ checked: true }); // will be checked $("#checkB").attr({ checked: true }); // will be checked $("#checkB").attr({ checked: false }); // will be unchecked $("#checkC").attr({ checked: true }); // will be checked $("#checkC").attr({ checked: false }); // will be unchecked $("#checkC").attr({ checked: true }); // will be checked, has effect in 1.8.3, but has not effect in 1.9.1 and 1.10.2 $("body").append("<div>checkA.checked:" + checkA.checked + "</div>" + "<div>checkB.checked:" + checkB.checked + "</div>" + "<div>checkC.checked:" + checkC.checked + "</div>"); }); </script> </head> <body> <div><input id="checkA" type="checkbox" /> checked</div> <div><input id="checkB" type="checkbox" /> unchecked</div> <div><input id="checkC" type="checkbox" /> checked, has effect?(has effect in 1.8.3, but has not effect in 1.9.1 and 1.10.2)</div> </body> </html>
Attachments (0)
Change History (1)
Changed August 26, 2013 01:44PM UTC by comment:1
resolution: | → duplicate |
---|---|
status: | new → closed |
Duplicate of #13573.