Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add style to each class

var all = document.getElementsByClassName('someClass');
for (var i = 0; i < all.length; i++) {
  all[i].style.color = 'red';
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #add #style #class
ADD COMMENT
Topic
Name
1+5 =