Side navigation
#4215 closed bug (invalid)
Opened February 23, 2009 02:09AM UTC
Closed March 21, 2009 02:35PM UTC
Attribute "value" does not work well
Reported by: | markeli | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Details:
********************************
<div id=div_001 value='12'></div>
....
$("#div_001").attr("value") returns null
Attachments (0)
Change History (5)
Changed February 23, 2009 04:02AM UTC by comment:1
Changed February 23, 2009 04:10AM UTC by comment:2
However, using getAttribute works correctly:
http://jquery.nodnod.net/cases/147
I've attached a patch.
Changed February 23, 2009 04:13AM UTC by comment:3
Or rather, I should clarify that getAttribute works on Firefox, but is buggy on other browsers, so the patch will have to wait until someone thinks of a way to feature-detect proper getAttribute support.
Changed February 23, 2009 04:18AM UTC by comment:4
Actually, nevermind. Using $().attr() works:
http://jquery.nodnod.net/cases/148
Looks like this is because .val() falls back to using element.value which doesn't work in cases liket his.
Changed March 21, 2009 02:35PM UTC by comment:5
resolution: | → invalid |
---|---|
status: | new → closed |
Test case:
http://jquery.nodnod.net/cases/146
But looks like this is related to ticket #4160