Hello. Climbed the entire Internet in search of a similar button, which I will now describe. There are elements

<div id="wrap"> ... <div id="button_menu" onlick="Menu.Show();">Кнопка, которая вытаскивает меню</div> <div id="box_menu">... различная навигация ...</div> ... </div> 

The question is, I need to do this: When you click on the button, the menu drops out. If you click inside the navigation, the menu remains in place, and click outside the menu minimizes the menu. Ideally, it would also be possible to pull out the menu with a click, and if the cursor is on the button or on the navigation itself, the menu is not moveable, if the cursor goes outside, then the menu closes after 5 seconds, if within 5 seconds the cursor is in the menu then it remains open.

Technically describe it turned out. But in practice, knowledge is not enough. The maximum that I wrote is to open the menu by clicking and clicking again to any place, including the menu, closes the window. But this is a bad option, moreover, for each menu you need to register an event by clicking in the document.

Do basting, ready, etc. Thank you in advance

  • @Nick, According to the rules of the forum, questions should not be limited to the decision or the completion of student assignments. Please clarify what you have done yourself and what did not work out. - Palmervan

1 answer 1

Not fully according to your requirements, but I made this option

  • Perfectly! Thank you very much, Deonis! - Selected