JSFiddle - React, Tailwind, and code Playground

by stopsatgreen

HTML

<p id="hova">Hova</p>

CSS

p {
    background-color: red;
    -moz-transition: all 1s linear;
    -webkit-transition: all 1s linear;
}

p:hover { background-color: green; }

p.hova { background-color: yellow; }

JavaScript

var hova = document.getElementById('hova');
hova.addEventListener('transitionend',function(e){
    this.className = 'hova';
},false);
hova.addEventListener('webkitTransitionEnd',function(e){
    this.className = 'hova';
},false);