Answers for "javascript can you set a dataset on a text"

7

dataset js

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

for jquery : 
$(element).attr('data-key', 'value');
Posted by: Guest on June-30-2020

Code answers related to "javascript can you set a dataset on a text"

Code answers related to "Javascript"

Browse Popular Code Answers by Language