Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10479 closed bug (invalid)

.prop select matching element instead of property

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


<form id="form_id">
<input name="id" value="input_id" />

$('#form_id').prop('id'); returns "<input name="id" value="input_id" />"

when it should return "form_id"

Change History (1)

comment:1 Changed 11 years ago by timmywil

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

That is the expected and specified behavior of properties on a form. .attr('id') will do what you're looking for.

Note: See TracTickets for help on using tickets.