I have a table, I want to load the page with its hidden content, and when I click on the title (in the example below waiting ), load the content and click on the title again the content is collected and hidden.
How can I do this?
<div class="table-aguardo">
<div class="header" style="background-color: green;">Aguardando</div>
<table cellspacing="0">
<tr>
<th>Leito</th>
<th>Acomodação</th>
<th>Tempo</th>
<th>Tipo</th>
<th width="230">Comentário</th>
</tr>
<tr>
<td style=" font-size: 3em;">321</td>
<td>Apartamento</td>
<td>10:01</td>
<td>Clínico</td>
<td>TESTE</td>
</tr>
<tr>
<td style=" font-size: 3em;">412</td>
<td>Apartamento</td>
<td>10:01</td>
<td>Clínico</td>
<td>TESTE</td>
</tr>
<tr>
<td style=" font-size: 3em;">110</td>
<td>Enfermaria</td>
<td>10:01</td>
<td>Cirurgico</td>
<td>TESTE</td>
</tr>
<tr>
<td style=" font-size: 3em;">215</td>
<td>Isolamento</td>
<td>10:01</td>
<td>Cirurgico</td>
<td>TESTE</td>
</tr>
</table>
</div>