jquery / jquery/api.jquery.com
jQuery.fn.data() and data-* attribute name restrictions
Open
@AurelioDeRosa is already working on this.
Since Oct 6, 2015.
help wanted
- Dominant language
- HTML
- Stars
- 325
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
http://bugs.jquery.com/ticket/14376
jQuery.fn.data() will not work data-* attributes in the very specific case where an attribute has been named with multiple words and any of the words after the first word (not including data-) begin with a digit.
Example:
<div data-foo-42></div>
However, these work just fine:
<div data-42></div>
<div data-foo42></div>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.