JSFiddle - React, Tailwind, and code Playground

by Bonabelle

HTML

<div class="text1">Text 1</div>
<div class="text2">Text 2</div>
<div class="text3">Text 3</div>

CSS

.text2, .text3 { display: none; }
div { background: #aaa; }

JavaScript

function fade() {
        $('.text1').fadeIn().delay(5000).fadeOut();
        $('.text2').delay(5000).fadeIn().delay(5000).fadeOut();
        $('.text3').delay(10000).fadeIn().delay(5000).fadeOut(fade);
    }
    fade();