Bug Tracker

Opened 10 years ago

Closed 10 years ago

#13433 closed bug (notabug)

$('#selector').checked for element does not work

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

Description

for jQuery 1.9.1, using chrome (not checked other browsers) a selector such as $('#chk').checked returns undefined whereas document.getElementById("chk").checked returns the current property value.

Change History (1)

comment:1 Changed 10 years ago by gibson042

Component: unfiledattributes
Resolution: notabug
Status: newclosed

checked is a property of native DOM elements; not of jQuery collections. Use $("#chk").prop("checked").

Note: See TracTickets for help on using tickets.