Answers for "query selector classlist contain"

1

javascript loop over classlist

var myElements = document.getElementsByClassName("some_class_name");
for(var i = 0; i < myElements.length; i++){
	console.log(myElements[i]);
}
Posted by: Guest on July-30-2019
3

classlist

// use the classList API to remove and add classes
div.classList.remove("foo");
div.classList.add("anotherclass");
Posted by: Guest on March-22-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language