Skip to content
This repository was archived by the owner on Feb 24, 2022. It is now read-only.
This repository was archived by the owner on Feb 24, 2022. It is now read-only.

$.data doesn't work when hyphen is used #96

@nickngqs

Description

@nickngqs

This will not work

div(data-animal-type='dragon')
$('div').data('animal-type'); // undefined

This will work

div(data-animaltype='dragon')
$('div').data(animaltype); // dragon

I think animal-type should work since we see alot of hyphens in HTML documents and is in the spec as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions