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: .5s;
}
p{
margin: 20px;
}
JavaScript
$(document).ready(function(){
//when the text is clicked, start the transition
$("#text").bind("click", function(){
$(this).addClass("enabled");
})
document.addEventListener("oTransitionEnd", function(){
alert("Transition Ended");
});
$('#text').on('transitionend', function() {
alert('d');
});
});