JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#">click</a>
<div></div>
CSS
div {
display: block;
background: green;
height: 100px;
width: 100px;}
JavaScript
$('a').click(function(){
$('div').stop().fadeOut(400,
function(){
$(this)
.css('background','yellow')
.fadeIn(1800);});
});