JSFiddle - React, Tailwind, and code Playground

HTML

<div id="background">
<div id="fadeshow1">fadeshow1</div>
<div id="fadeshow2">fadeshow2</div>
</div>

CSS

#fadeshow1 { display:none; position: absolute; }
#fadeshow2 { display:none; position: absolute; }
#background { padding:10px; background:#ccc; height:100px; width:100px }

JavaScript

$(document).ready(function(){
    function animate(){
    $('#fadeshow1').delay(5000).fadeIn('fast', function(){
        $(this).delay(5000).fadeOut('fast', function(){
            $('#fadeshow2').fadeIn('fast', function(){
                $(this).delay(5000).fadeOut();
            });
        });
    });
        }
         animate();  
    setInterval(animate, 15000);
});