JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr class="informations1 informations" value="1">
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
</tr>
</table>
JavaScript
$(document).ready(function(){
var i = 1;
$("tr").click(function(e){
e.preventDefault();
var num = $(this).attr('value');
if(i == 1)
{
$(".informations"+num).show('slow');
i = 0;
}
else
{
$(".informations"+num).hide('slow');
i = 1;
}
console.log(num);
});
});