#10012 closed bug (invalid)
$.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: http://jsfiddle.net/4LWvB/
Change History (4)
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Component: | unfiled → data |
---|---|
Milestone: | None → 1.6.3 |
Priority: | undecided → low |
comment:3 Changed 11 years ago by
Milestone: | 1.6.3 |
---|
Note: See
TracTickets for help on using
tickets.
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."