JSFiddle - React, Tailwind, and code Playground
HTML
<div id="divprincipal">
<table id="tableprincipale">
<tr>
<td>
<input type="button" id="boutonShow" value="Voir détails"/>
<input type="button" id="boutonHide" value="Masquer détails"/>
</td>
</tr>
</table>
<div id="divdetails" class="divdetails" name="mondivacacher">
<p>
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
</p>
</div>
CSS
.divdetails{
background-color:navy;
color:white;
padding:5px;
border:solid blue 2px;
margin:5px;
}
JavaScript
$('#boutonHide').click(function(){
$('#divdetails').slideLeft('slow', function() {
// Animation complete.
alert("tu kiffes hein ?!!");
});
});
$('#boutonShow').click(function(){
$('#divdetails').show('slow', function() {
// Animation complete.
});
});