Data attributes

Download javascript eBook

Syntax

  • var x = HTMLElement.dataset.*;
  • HTMLElement.dataset.* = "value";

Remarks

MDN Documentation: Using data attributes.

Related Examples

Stats

69 Contributors: 2
Thursday, July 28, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook