Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add css on click javascript

document.querySelector('#image').addEventListener('click', () => {
  document.querySelector('#foo').classList.add('myClass');
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #css #click #javascript
ADD COMMENT
Topic
Name
9+6 =