Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dataset js

for javascript : 
webappData.getAttribute('data-id');
document.querySelector('#elementId').dataset.id = 'value';

for jquery : 
$(element).attr('data-key', 'value');
 
PREVIOUS NEXT
Tagged: #dataset #js
ADD COMMENT
Topic
Name
1+7 =