JSFiddle - React, Tailwind, and code Playground
by j08691
HTML
Below me is a DIV called "theDiv".
<br>
<br>
<div id="theDiv" style="background-color:yellow;display:none;width:30%;margin:0 auto;">This text is inside the Div called "theDiv".</div>
<br>
<br>
<input type="button" id="showDiv" value="Show DIV">
JavaScript
$("#showDiv").click(function () {
$('#theDiv').show(1000, function () {
setTimeout(function () {
$('#theDiv').html(function () {
setTimeout(function () {
$('#theDiv').html('Here is some replacement text');
}, 0);
setTimeout(function () {
$('#theDiv').html('More replacement text goes here');
}, 2500);
});
}, 2500);
});
}); //click function ends