Skip to main content

Bug Tracker

Side navigation

#10479 closed bug (invalid)

Opened October 12, 2011 04:03AM UTC

Closed October 12, 2011 04:29AM UTC

.prop select matching element instead of property

Reported by: daniel@danielc.net 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"

Attachments (0)
Change History (1)

Changed October 12, 2011 04:29AM UTC by timmywil comment:1

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.