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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #add #class
ADD COMMENT
Topic
Name
3+4 =