Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question