Modify ↓
Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:1 Changed 2 years ago by rwaldron
- Priority changed from undecided to low
- Resolution set to invalid
- Status changed from new to closed
- Component changed from unfiled to attributes
comment:2 Changed 2 years ago by timmywil
- Resolution changed from invalid to fixed
Make the value hook less obtrusive for elements which do not inherently have a value property. Fixes #9328.
Changeset: ba90af0dc5b279d785e49ff5c051073d2178d372
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

There is no "value" attribute for DIV elements.
http://dev.w3.org/html5/spec/Overview.html#global-attributes