Javascript - get data attribute

getAttribute

dataset property — part of the new HTML5 JavaScript API. It will return a DOMStringMap object of all the selected element's data- attributes.

Comments