Skip to content

Instantly share code, notes, and snippets.

@cyrilletuzi
Created January 29, 2017 10:25
Show Gist options
  • Save cyrilletuzi/19be7ee8e06510245237c98eeb5889e7 to your computer and use it in GitHub Desktop.
Save cyrilletuzi/19be7ee8e06510245237c98eeb5889e7 to your computer and use it in GitHub Desktop.
/* jQuery */
element.data('customName');
element.data('customName', `Value`);
/* JavaScript */
element.dataset.customName;
element.dataset.customName = `Value`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment