Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

change bg-color all class

var elements = document.getElementsByClassName('casd'); // get all elements
	for(var i = 0; i < elements.length; i++){
		
		elements[i].classList.toggle("bg-primary");
	}
 
PREVIOUS NEXT
Tagged: #change #class
ADD COMMENT
Topic
Name
9+4 =