JSFiddle - React, Tailwind, and code Playground
HTML
<div id="text">
Click this text to start a transition.
</div>
CSS
.enabled{
color: red;
-o-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("otransitionend", function(){
alert("Transition Ended");
});
});