JSFiddle - React, Tailwind, and code Playground
HTML
<input id="Masque" type="button" onClick="$();" value="Masquer" />
<div id="Global">
<div id="Conteneur">
<div id="div1"></div>
</div>
</div>
CSS
#Global {
width:300px;
height:100px;
background-color: yellow;
}
#Conteneur {
position: absolute;
background-color: red;
width:200px;
height:100px;
}
#div1 {
width:200px;
height:40px;
background-color: green;
}
JavaScript
$("#Masque").click(function () {
$('#div1').slideUp(10).delay(1000).slideDown(10);
});