Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove a class from all elements javascript

var class_name='classname';

elements=document.getElementsByClassName(class_name)

for(element of elements){
  element.classList.remove(class_name)
}
 
PREVIOUS NEXT
Tagged: #remove #class #elements #javascript
ADD COMMENT
Topic
Name
9+3 =