I'm developing this site and for now I have not put any JavaScript code in it to make it dynamic.
I have a problem that is repeated in all projects because of lack of knowledge of language and logic, the following problem:
When I hover over menu
, it opens sub-menu
but when I hover the mouse over menu
to try to access sub-menu
as menu
loses focus, sub-menu
disappears before I focus on any item of it.
Every time I end up resolving with gambiarra but I would like to understand the logic of solving it.
The code is normal:
<ul class="menu">
<li>
<a href="#">Categoria</a>
<ul class="sub-menu">
<li>Sucategoria</li>
</ul>
</li>
</ul>
Typical Wordpress menu.
I've noticed that this happens mainly if the sub-menu
has a menu
margin, a problem that can be caused by sub-menu
needing to gain focus immediately after menu
lose focus.