Bug Tracker

Modify

Ticket #9328 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

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

There is no "value" attribute for DIV elements.

 http://dev.w3.org/html5/spec/Overview.html#global-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

comment:3 Changed 2 years ago by rwaldron

#9642 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.