Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js set 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 #set #class
ADD COMMENT
Topic
Name
3+1 =