Answers for "classList.contains(classes.)"

5

js check for class in classList

element.classList.contains(className);
Posted by: Guest on August-27-2020
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