Skip to content

Attributes "data-graph-yaxis-X-reversed" are not interpreted by the browser if X is an integer #60

@tut-tuuut

Description

@tut-tuuut

$table.data('graph-yaxis-'+yAxisNum+'-min') is always null on my browser, even if the attribute data-graph-yaxis-1-min is set on the <table>.
Looks like this "1" between 2 dashes is the problem.

When I look at document.querySelector('table').dataset I get :

DOMStringMap { graphYaxis-1Min: "0", graphType: "line", graphContainerBefore: "1" }

When I look at '$('table').data()` I get :

Object { graphContainerBefore: 1, graphType: "line" }

So jQuery seems to have issues when mapping the dataset to an object.
I suggest using another convention for naming these data-attributes. :)

Browser : Firefox 32.0.3
Jquery : 2.1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions