I have a table that shows values coming from the database. Below the line is trying to run a div to use the jquery toggle () function. I do not know what I'm doing wrong, because when it clicks it shows everyone. I just want the line clicked to appear in div. Thanks guys.
HTML:
<table class="table table-striped table-hover">
<thead>
<tr>
<th scope="col">Nº do Cliente</th>
<th scope="col">Nome</th>
<th scope="col">Status</th>
<th scope="col">Corretor</th>
<th scope="col">Data de Cadastro</th>
<th scope="col">Ações</th>
</tr>
</thead>
<tbody>
<?php
//aqui fica uma função PHP de SELECT. tirei pra nao ficar grande o codigo html. =) {
?>
<tr style="padding:20px;">
<td>ID</td>
<td><span class="nomeTabela">Nome</span></td>
<td>Ativo</td>
<td>Eraldo Carlos</td>
<td>20/06/2018</td>
<tr class="tblOculto"><td>
<div class="divOculto">
Aqui vem a informação oculta.
</div>
</td></tr>
<?php
}
?>
</tr>
</tbody>
</table>
JQUERY:
$(document).ready(function(){
$(".nomeTabela").click(function(){
$('.tblOculto').css('display', 'block');
$(".divOculto").slideToggle("slow");
});
});