I'm with a bootstrap screen that contains two tabs, one called "Settings" and the other "Users". Within the "Settings" tab, I have a simple, normal form, already inside the "Users" tab, I have a select from the bank, and with that result I set up a pagination.
The problem is that when I click on any pagination link, the screen returns to the "Settings" tab.
I have tried to add the active class in the corresponding tabs and divs via jQuery but it did not work, I also tried to pass the id
of the tab to the URL but also did not.
jQuery Excerpt:
$(".pagination").find('a').each(function(){
$(this).click(function(e){
e.preventDefault();
$("a[href='#alunos']").tab('show');
});
});
HTML Excerpt:
<ul id="tabs_sistem" class="nav nav-tabs">
<li id="tab_perfil" class="active">
<a href="#perfil" data-toggle="tab">Configurações</a>
</li>
<li id="tab_alunos">
<a href="#alunos" data-toggle="tab">Usuários</a>
</li>
</ul>
Tab with pagination:
<div class="tab-pane" id="alunos">
<table class="table table-striped table-hover table-instituicao-usuario-list">
<thead>
<th>Nome</th>
<th>E-mail</th>
<th>Data de nascimento</th>
<th>Perfil</th>
<th class="text-center">Remover</th>
</thead>
<tbody>
<?php
include realpath(dirname(__FILE__)) . '/includes/sistema.paginacao.php';
?>
</tbody>
</table>
</div>