1
If anyone can help me, I have the following problem. By clicking on the menu that is the reference id for my jquery it loads the page only with several clicks in the menu and when it appears I click again the page some.
I used two different codes but they give me the same problem.
follows below the codes.
Script Jquery
<script src="jquery/jquery-3.1.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#link1').click(function(event){
$( "#cliente1" ).load( "c_cliente.php" );
$.ajax({
url: 'c_cliente.php',
cache: false,
success: function(retorno){
$('#cliente1').append(retorno);
}
});
});
/*
$('#link1').click(function(event){
$( "#cliente1" ).load( "c_cliente.php" );
});
$('#link2').click(function(){
$( "#cliente1" ).load( "f_funcionario.php" );
});
*/
});
</script>
Menu
<body>
<div class="overflow_em_container">
<div class="container-fluid">
<div class="nav-side-menu btn-branco">
<div class="collapse navbar-collapse " id="side-menu" >
<ul class="nav navbar-nav ">
<li id="link1" ><a href="" >Premium</a></li>
<li id="link2"><a href="">Premium</a></li>
<li><a href="">Ajuda</a></li>
<li><a href="">Baixar</a></li>
<li><a href="">Increver-se</a></li>
<li><a href="">Entar</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="cliente1"></div>
</body>
$('#cliente1').html(retorno);
make that change– novic
hello, this the same thing, I click appears once and then it disappears then I give several clicks and appears and when I click again it disappears.
– junio
now that I’ve seen! you’re calling two ajax functions in the same click???? guess all you need is this.
$('#link1').click(function(event){
 $( "#cliente1" ).load( "c_cliente.php" );});
– novic
Thanks for the help, it was just the '#' I forgot to put on href.
– junio