Opened 11 years ago
Closed 11 years ago
#13345 closed bug (duplicate)
attr('checked', 'checked')
Reported by: | anonymous | Owned by: | anonymous |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | git |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
function cball(o) {
o = $(o); var obj = o.parent().next('.cb').find(':checkbox'); if (o.find(':eq(0)').is(':checked'))
obj.attr('checked', 'checked');
else
obj.removeAttr('checked');
}
1.9 can not do this,1.8 is can do this
Change History (3)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Owner: | set to anonymous |
---|---|
Status: | new → pending |
Thanks for taking the time to contribute to the jQuery project! I suspect that you intended to use .prop("checked", <boolean>)
instead of .attr
/.removeAttr
, but please read http://jquery.com/upgrade-guide/1.9/#attr-versus-prop- to confirm and test again with the jQuery migrate plugin.
If after doing so you still believe this to be a real issue, we'll need a complete reduced test case on jsFiddle to help us assess your ticket. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.
comment:3 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | pending → closed |
Duplicate of #13245.
Same with removeAttr('selected')