If possible, help me, I have the following problem. When clicking on the menu that is the reference id for my jquery it loads the page with only several clicks on the menu and when it appears I click the page again again.
I used two different codes but they give me the same problem.
below the codes below.
Jquery Script
<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>