Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

data-item-id

// Here's our buttonvar button = document.getElementById('your-button-id'); // Get the valuesvar cmd = button.getAttribute('data-cmd');var id = button.getAttribute('data-id'); // Change the valuesbutton.setAttribute('data-cmd', yourNewCmd);button.setAttribute('data-id', yourNewId);
Source by www.abeautifulsite.net #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
3+9 =