JSFiddle - React, Tailwind, and code Playground

by Bhabani Raju

HTML

<div style=" width: 500px; height:500px;">
    <div id="first-box">Waite 5 seconds</div>
    <div id="second-box" class="hide">Hi All</div>
</div>

CSS

.hide {
    display: none;
}

.block
{
   display: block;
  }

JavaScript

$(document).ready(function () {
    timer = setInterval(function () {
        $('#second-box').toggleClass('hide');
          $('#first-box').toggleClass('hide');
        //  alert("");
    }, 5000);
});