Hello, Stack Over Flow community, I am trying to include pages via ajax
, but when I click to open dropdown
it is ignored and adds the page Index of
WampServer
how to proceed in these cases?
Here I will put an image and the code JavaScript
:
$(function() {
$("#loading").hide();
$("ul.nav a").click(function() {
page = "template/pages/"+$(this).attr('href')
$("#loading").ajaxStart(function() {
$(this).show();
});
$("#loading").ajaxStop(function() {
$(this).hide();
});
$("#main").load(page)
return false;
});
});
Main: Content:
<section id="main" class="section-main">
<img src="template/assets/images/icons/load.gif" id="loading">
<?php
include("./template/pages/meus-tickets.php");
?>
</section>
Menu:
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<i class="glyphicon glyphicon-user"></i> <span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#"><i class="glyphicon glyphicon-edit"></i> Editar perfil</a></li>
<li><a href="novo-ticket.php"><i class="glyphicon glyphicon-open"></i> Submeter um ticket</a></li>
<li role="separator" class="divider"></li>
<li><a href="#"><i class="glyphicon glyphicon-log-out"></i> Sair</a></li>
</ul>
</li>
</ul>
Note: I would like links without dropdown
and dropdown
to continue working, waiting for answers. [] 's