Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add class

var element = document.getElementById('element');
element.classList.add('class-1');
element.classList.add('class-2', 'class-3');
element.classList.remove('class-3');
 
PREVIOUS NEXT
Tagged: #js #add #class
ADD COMMENT
Topic
Name
4+7 =