3
I have a screen made in the bootstrap that contains two tabs, one called "Settings" and the other "Users". Inside the tab "Settings", I have a simple, normal form, already inside the tab "Users", I have a bank select, and with this result I mount a pagination.
The problem is that when I click on any page link, the screen goes back to the tab "Settings".
I tried to add the "active" class in the corresponding tabs and Divs via jQuery but it didn’t work, I also tried to pass the id
tab by URL but also failed.
Stretch jQuery:
$(".pagination").find('a').each(function(){
$(this).click(function(e){
e.preventDefault();
$("a[href='#alunos']").tab('show');
});
});
Snippet:
<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>
Flaps like the of this link? I think you will need to post your page code as it is probably an implementation detail.
– utluiz
that, and that’s right, only inside one of them has a pagination, I’ll post the code
– Daniel Swater
You could post an example at http://jsfiddle.net/ to improve your question.
– Caio Tarifa
http://jsfiddle.net/danielswater/qeu9z/
– Daniel Swater