Side navigation
#10012 closed bug (invalid)
Opened August 10, 2011 01:01PM UTC
Closed August 10, 2011 01:37PM UTC
Last modified August 27, 2011 08:18PM UTC
$.data(this,'foo') != $(this).data('foo') with html5 data attributes
Reported by: | anonymous | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | data | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.data(this,'foo') return "undefined" with html5 data attributes
$(this).data('foo') return correct value with html5 data attributes
See it:
Attachments (0)
Change History (4)
Changed August 10, 2011 01:37PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Changed August 10, 2011 02:16PM UTC by comment:2
component: | unfiled → data |
---|---|
milestone: | None → 1.6.3 |
priority: | undecided → low |
Changed August 26, 2011 01:46AM UTC by comment:3
milestone: | 1.6.3 |
---|
Thanks for taking some time to contribute to the jQuery project, but this is a known, documented, and intended behaviour. From the docs for jQuery.data(elem, key)
"Regarding HTML5 data-* attributes: This low-level method does NOT retrieve the data-* attributes unless the more convenient .data() method has already retrieved them."