Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add multiple class from array javascript

const classArray = ["cl1", "cl2", "cl3"];
div.classList.add(...classArray);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #multiple #class #array #javascript
ADD COMMENT
Topic
Name
1+4 =