S
S
Sergey2016-12-13 19:26:21
css
Sergey, 2016-12-13 19:26:21

Pop-up vertical submenu. Nuances?

Hello! Faced a problem. I made a vertical menu with a pop-up submenu on hover. But when moving the mouse diagonally down, the next submenu naturally pops up. Here on this site allo.ua , when moving the mouse exactly vertically, the menus open, but not diagonally, which gives the user the opportunity to hover the mice over the submenu.

Here's how to do it???

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
kn1ght_t, 2016-12-13
@sergik15828

https://github.com/kamens/jQuery-menu-aim

S
sashadobrota, 2016-12-13
@sashadobrota

On mousemove you hang a handler that monitors the coordinates of the mouse cursor and calculates at what angle it moves using the magic of trigonometry. Or you can try to watch how the X-coordinate changes in relation to Y.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question