I want add animation class continuously on clicking for that I have written below code
My Code
My problem is when I click first time then only first time animation works on second click animation not working. Please help.
You can add setTimeout for delay to add add class
Stackblitz Demo
rotate(event){
event.srcElement.classList.remove("rotate");
setTimeout(()=>{
event.srcElement.classList.add("rotate");
},0)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With