JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
<title>test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.when(
$('#test').fadeOut(500, function() {
$(this).fadeIn(500, function() {
$(this).remove();
});
})
).done(function() {
$('#test2').text('TEST OK!!!!');
});
});
</script>
</head>
<body>
<div id="test" style="background-color: blue; width:100px; height: 100px"></div>
<div id="test2" style="background-color: green; width:100px; height: 100px"></div>
</body>
</html>