Play css animation with JS onhover code example
Example: Play css animation with JS onhover
const button = document.getElementById("btn");
const disp_text = document.getElementById('disp_text');
button.onmouseover = function(){
disp_text.style.animation = "fadein 1s linear";
disp_text.innerText = "Next";
}