Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

es6 add and remove class

let el = document.getElementById('container');

//remove class
el.classList.remove('first');

//remove class
el.classList.add('first');
 
PREVIOUS NEXT
Tagged: #add #remove #class
ADD COMMENT
Topic
Name
6+4 =