I have seen some examples online but they have not worked for me the way I need to, and when I click on the id
of a href
that is the same of a div
show me the table that is hidden.
HTML CODE
<a href="#" id="display_table_students"> DB STUDENTS</a>
<br>
<div id="display_table_students" style="display: block;">
<table id="table_student" class="display" cellspacing="0" width="100%" style="display: none">
<thead>
<tr>
<th>Nombre</th>
<th>Apellido</th>
<th>Correo</th>
<th>Editar</th>
</tr>
</thead>
</table>
</div>
JS CODE
$('#display_table_students').click(function(e)
{
$("#formNewStudent").delay(100).fadeIn(100);
$("#formUpdatePassword").delay(100).fadeIn(100);
$("#formNewStudent").fadeOut(100);
$("#formUpdatePassword").fadeOut(100);
$('#register-form-link').removeClass('active');
$('#login-form-link').removeClass('active');
$(this).addClass('active');
e.preventDefault();
});
What's going on? that I have some forms with a small effect ex:
REGISTRAR ESTUDIANTES | ACTUALIZAR ESTUDIANTES | DB STUDENTS <-(ESTOS SON LINKS)
Each time I click on a link, one is hidden and the other is shown with a form. What I want is when I click on the LINK DB STUDENTS
the table to which I put a style= 'none'
is displayed, because if I remove this attribute or style is reflected in all the links.
In few words that only and only click on DB STUDENTS
I see the hidden table.
I hope you made me understand and I appreciate the interest.