JSFiddle - React, Tailwind, and code Playground

by Timmy Willison

HTML

<div id="test"></div>
<div id="test2"></div>

CSS

div {
    background-color: blue;
    width:100px;
    height: 100px
}
#test2 {
    background-color: green;
}

JavaScript

var p = $.when(
    $('#test').fadeOut(500, function() {
        $(this).fadeIn(500, function() {
            $(this).remove();
        });
    })
);

console.log( p );

p.done(function() {
    console.log('done');
    $('#test2').text('TEST OK!!!!');
});