JSFiddle - React, Tailwind, and code Playground
HTML
<div id="text">
Click this text to start a transition.
</div>
CSS
.enabled{
color: red;
transition-duration: 2s;
}
p{
margin: 20px;
}
JavaScript
$(document).ready(function(){
//when the text is clicked, start the transition
$("#text").bind("click", function(){
$(this).addClass("enabled");
})
$(document).bind("transitionend", function(e){
alert("Transition Ended: " + e.originalEvent.propertyName);
});
});