JSFiddle - React, Tailwind, and code Playground
HTML
<div id="foo">Hello world<div>
CSS
#foo {
width: 200px;
height: 30px;
display: none;
background-color: red;
}
JavaScript
$('#foo').show(0).delay(5000).hide(0);
<div id="foo">Hello world<div>
#foo {
width: 200px;
height: 30px;
display: none;
background-color: red;
}
$('#foo').show(0).delay(5000).hide(0);