JSFiddle - React, Tailwind, and code Playground
by jquerybyexample
HTML
<input type="button" id="btnReset" Value=" Run Demo Again!!" />
<br/><br/>
<div class="content"> Hello, I will disappear in 3 seconds! </div>
CSS
body
{
padding: 10px;
font-size:16pt;
font-family: Calibri;
}
.content
{
color: Green;
border: 2px solid Red;
width:300px;
padding: 10px;
}
JavaScript
$(document).ready(function() {
setTimeout(function() {
$(".content").fadeOut(1500);
}, 3000);
$('#btnReset').click(function() {
$(".content").show();
setTimeout(function() {
$(".content").fadeOut(1500);
}, 3000);
});
});