Je voudrais que quand on clic ailler que sur la div qu'il referme automatiquement ma div
code =html
<div class="bg-icons" onclick="myFunction(this)" >
<a href="#"class="icons active"></a>
</div>
<ul id ="mobile-menu" >
<li>
<div class="boxpad" ><a href="">Logo text</a></div>
<div class="boxpad"><a href="">Logo text</a></div>
</li>
<li>
<div class="boxpad" id="bluebox"><a href="">Logo text</a></div>
<div class="boxpad"><a href="">Logo text</a></div>
</li>
</ul>
code =jquery
function myFunction(x) {
$("#mobile-menu").toggleClass("menu-hidden", 800, "easeOutQuint");
};
code =html
<div class="bg-icons" onclick="myFunction(this)" >
<a href="#"class="icons active"></a>
</div>
<ul id ="mobile-menu" >
<li>
<div class="boxpad" ><a href="">Logo text</a></div>
<div class="boxpad"><a href="">Logo text</a></div>
</li>
<li>
<div class="boxpad" id="bluebox"><a href="">Logo text</a></div>
<div class="boxpad"><a href="">Logo text</a></div>
</li>
</ul>
code =jquery
function myFunction(x) {
$("#mobile-menu").toggleClass("menu-hidden", 800, "easeOutQuint");
};