0
I have a PHP site where I have to upload several pages. But only once.What’s happening is the overlapping of screens with various inclusions.
<div class="container">
<h2>MAPAS</h2>
<ul class="nav nav-tabs">
<li><a data-toggle="tab" href="#menu1">Detalhes</a></li>
<li class="active"><a data-toggle="tab" href="#menu2">Mapas</a></li>
<li><a data-toggle="tab" href="#menu3">Cadastrar Devices</a></li>
<li><a data-toggle="tab" href="#menu4">Alerta</a></li>
</ul>
<div class="tab-content">
<div id="menu1" class="tab-pane fadee">
<?php require_once "paginas/detalhes.php"; ?>
</div>
<div id="menu2" class="tab-pane fade in active">
<?php require_once "paginas/mapas.php"; ?>
</div>
<div id="menu3" class="tab-pane fade">
<?php require_once "paginas/cadastrodivices.php"; ?>
</div>
<div id="menu4" class="tab-pane fade">
<?php require_once "paginas/alerta.php"; ?>
</div>
</div>
</div>
What’s the mistake Alex?
– Miguel
The structure of the Maps screen is present in all tabs..
– alexjosesilva
I just want to load each structure once....
– alexjosesilva
Is it because they are not there, but behind each other? See the source code of the page to see if they are there
– Miguel
Yes.. the error in include or require.. I need to load once and not load anymore. Think using ajax here or Jquery ??
– alexjosesilva
Jquery/Javascript, you have to delegate the event click on the tabs and make the section appear, I’ll put a simple example with jquery below. But apparently you’re wearing bootstrap
– Miguel