css transition with javascript code example
Example: start animation with javascript
element.addEventListener("click", function(e){
element.classList.remove("anim");
setTimeout(() => element.classList.add("anim"), 0);
}, false);
element.addEventListener("click", function(e){
element.classList.remove("anim");
setTimeout(() => element.classList.add("anim"), 0);
}, false);