What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-09-08 13:50:02
how to add class to element on mouseclick with js
// element.classList.add("newClass"); // or // element.className += "newClass"; // Example document.querySelector("button").onclick = function addNewClass() { document.querySelector(".elementToChange").classList... Add solution
Best helpers
Ranking is empty