Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10357 closed bug (wontfix)

remoteAttr("checked") destroys defaultChecked

Reported by: [email protected] Owned by:
Priority: low Milestone: None
Component: attributes Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:


Hello, i'm unsure if this is a bug, but when i have a checkbox:

<input type="checkbox" id="checkbox" name="checkbox" checked="checked" />

and uncheck the box with:


defaultChecked, is set to FALSE. When done by js:

document.getElementById("checkbox").checked = false; defaultChecked is still TRUE.

Is this a bug or just the way jquery is meant to be?

Change History (1)

comment:1 Changed 11 years ago by timmywil

Component: unfiledattributes
Priority: undecidedlow
Resolution: wontfix
Status: newclosed

Yes, this is intended behavior. We understand that boolean attributes correspond to their default properties, but in order to provide backwards compatibility (since the .attr() method worked primarily with properties prior to 1.6), we added a hook for booleans to give users the most commonly expected behavior. This may be deprecated and eventually removed in a future release.

Note: See TracTickets for help on using tickets.