how to insert an animation using javascript 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 add animation to element
var animation = element.animate(keyframes, options);