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").on('click', function () { 
$('#div1').slideUp(1000, function(){ $(this).delay(2000).slideDown(1000); })
});