Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js add class

var someElement= document.getElementById("myElement");
    someElement.className += " newclass";//add "newclass" to element (space in front is important)
 
PREVIOUS NEXT
Tagged: #js #add #class
ADD COMMENT
Topic
Name
4+9 =