Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#9328 closed bug (fixed)

1.6.1 .attr() and "value"

Reported by: anonymous Owned by:
Priority: low Milestone: 1.next
Component: attributes Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:

Description

<div value="1" class="test"></div> $(".test").val() is "" $(".test").attr("value") is undefined $(".test").prop("value") is undefined but if <input value="2" class="test2"></input> everything is fine how to get "value" at div?

Change History (3)

comment:1 Changed 9 years ago by Rick Waldron

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

There is no "value" attribute for DIV elements.

http://dev.w3.org/html5/spec/Overview.html#global-attributes

comment:2 Changed 9 years ago by timmywil

Resolution: invalidfixed

Make the value hook less obtrusive for elements which do not inherently have a value property. Fixes #9328.

Changeset: ba90af0dc5b279d785e49ff5c051073d2178d372

comment:3 Changed 8 years ago by Rick Waldron

#9642 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.