I would like to get this effect toggle
bootstrap in a table, that is to say: get that effect of displacement up, but all I get is that it appears and disappears with a horrible effect.
I leave you a bit of code:
$(function () {
$('.btn_show').click(function (ev) {
$('#contenido').slideToggle("slow");
});
})
.input-sm{
height: 20px;
font-size: 9pt;
width: 100%;
}
.letra{
font-size: 9pt;
}
table {
border-collapse: collapse;
border-left: 1px solid #000;
border-right: 1px solid #000;
width: 100%;
}
tr {
border-bottom: 1px solid #000;
}
input:[type=text]{
border-bottom: 1px solid #C00;
border: 0;
outline: none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<table width="100%">
<thead style="background:#000;text-align:center;">
<tr>
<td colspan="4">
<a class="btn_show" href="#!" style="color:#fff; font-size:12px"><strong>C.- Antecedentes</strong></a>
</td>
</tr>
</thead>
<tbody id="contenido" style="display:none">
<tr>
<th>
Peso RN:
</th>
<td>
<input type="text" class="input-sm">
</td>
<th>Parto:</th>
<td>
<input type="text" class="input-sm">
</td>
</tr>
<tr>
<td colspan="2">
Obs. Perinatales
</td>
<td colspan="2">
<input type="text" class="input-sm">
</td>
</tr>
<tr>
<td colspan="2">
Obs. Perinatales
</td>
<td colspan="2">
<input type="text" class="input-sm">
</td>
</tr>
</tbody>
</table>
How to get that scrolling effect in an html table?