animation with js code example
Example 1: start animation with javascript
element.addEventListener("click", function(e){
element.classList.remove("anim");
setTimeout(() => element.classList.add("anim"), 0);
}, false);
Example 2: js animation
You can learn js animation from here
https://www.w3schools.com/howto/howto_js_animate.asp