7 - Dataset & HTML5 data-* attributes

August 6, 2018 comments 86 Reads

By using the dataset() method that’s provided by the Dom7 Library (part of Framework7), you are able to access the “dataset” on HTML elements.
The “dataset” refers to the set of key-value pairs that are specified by using HTML5 data-attributes. The dataset() method in Dom7 will get all the key-value pairs as a plain JavaScript object.
Support me on Patreon:
https://www.patreon.com/dcode – with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
Follow me on Twitter @dcode!
If this video helped you out and you’d like to see more, make sure to leave a like and subscribe to dcode!