JSFiddle - React, Tailwind, and code Playground
HTML
<div id="pic">
<div id="one" class="slide"></div>
<div id="two" class="slide"></div>
<div id="three" class="slide"></div>
</div>
CSS
#pic {
width:460px;
height:300px;
margin:0 20px 0 20px;
overflow:hidden;
}
.slide {
width:460px;
height:300px;
}
#one {
...
JavaScript
$("#two, #three").hide();
$("#one").fadeOut(2000, function () {
$("#two").fadeIn(2000, function () {
$("#two").fadeOut(2000, function () {
$("#three").fadeIn(2000, function () {
$("#three").fadeout(2000);
});
});
});
});