Skip to content

.data() doesn't handle the attributes with digits in the name well #1751

Closed
@mgol

Description

@mgol

Originally reported by zerkms@… at: http://bugs.jquery.com/ticket/14376

version affected: any (1.10.1) browser: any (chrome) OS: any (windows 7 64bit)

For the following html

<div data-foo-42="bar"></div>

and

var div = $('div');

console.log(div.data());


javascript code I expect to see the object with one property.

Actual result: an empty object

jsfiddle:  http://jsfiddle.net/nWCKt/

Issue reported for jQuery 1.10.2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions