When working with multi-dimensional dropdown menus, you often encounter the problem of accidentally opening the wrong submenu or accidentally closing the desired submenu. This occurs when the mouse cursor leaves the corresponding menu at the top level while navigating to an already expanded submenu.
To solve the problem, one can easily incorporate a deliberate delay in the menu with the help of JavaScript:
See the Pen Pastejacking #2 by David Vielhuber (@vielhuber) on CodePen.
On the other hand, you can use sophisticated plugins such as jQuery-menu-aim , which even evaluate the direction of the mouse pointer movement.