I'm having some trouble creating a menu where pages are loaded into div
.
What happens is that I'm creating an application following the MVC standard, and I do the URL treatments to redirect them, for each controller, I do not know what happens when it loads the page it does not specifically open in div
where predefined.
jQuery code:
jQuery(function () {
jQuery('.ler').click(function () {
jQuery('#open').load('corpo.php', function (e) {
e.preventDefault();
});
});
})
HTML code:
<ul class="nav navbar-nav side-nav">
<li class="active"><a href="<?php URL?>dashboard"><i class="fa fa-dashboard"></i> Dashboard</a></li>
<li><a href="javascript:void(0)" class="ler"><i class="fa fa-bar-chart-o"></i> Categorias</a></li>
<li><a href="<?php URL?>noticia" class="ler"><i class="fa fa-table"></i> Noticias</a></li>
<li><a href="<?php URL?>galeria" class="ler"><i class="fa fa-edit"></i> Galeria</a></li>
<li><a href="<?php URL?>comentarios" class="ler"><i class="fa fa-font"></i> Comentarios</a></li>
<li><a href="<?php URL?>informacoes" class="ler"><i class="fa fa-font"></i> Informacoes</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-caret-square-o-down"></i> Menu <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Enviar Email</a></li>
<li><a href="#">Gerir Usuarios</a></li>
</ul>
</li>
</ul>
And the%% of% where pages will be loaded:
<!-- /#navegacao -->
<div id="open"></div>
<!-- /#navegacao //Fim -->