CSS animation triggered through JS only plays every other click
问题 I want to make a simple JavaScript onclick animation. My problem is that when I click onto the button, the animation is executed, but when I click again onto the button, nothing happens. On the third clicks the animation plays again. I want to make that, the animation plays at the second click. Heres my code" var anim = document.getElementById("anim"); anim.onclick = function highA() { var willCheck = document.getElementById("contactId"); if (!willCheck.classList.contains("highAnim")) {