Bug Tracker

Opened 8 years ago

Closed 8 years ago

#10479 closed bug (invalid)

.prop select matching element instead of property

Reported by: daniel@… Owned by:
Priority: low Milestone: None
Component: attributes Version: 1.6.4
Keywords: Cc:
Blocked by: Blocking:

Description

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

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

when it should return "form_id"

Change History (1)

comment:1 Changed 8 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.