1
I have the Following div:
<div class="sub-menu">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</ul>
</div>
I have a function in jQuery
that shows and hides this menu when I click on div botão
, I have two conditions to hide this sub menu, or by clicking on div botão
or by clicking on div sub-menu
using this function:
$(".sub-menu").click(function(){
if(status == 1){
$('.sub-menu').animate({
left: '-224px',
}, 300);
$('.fade').fadeOut();
status = 0;
$('.hamburg').removeClass('open');
}
});
the variable status
checks whether the sub-menu
open or closed, the problem is that when I click on li's
within the sub-menu
he ignores the link and just closes the div sub-menu
, how to make it readition normally to the supposed pages by clicking on the links?
worked perfectly my dear, had no knowledge of it, thank you very much!
– Hebert Lima