I have the following html:
Код: Выделить всё
#menu-container
{
width: 100%;
height: 40px;
// used to detect hover
}
.menu
{
border: 1px solid black;
width: 300px;
height: 20px;
margin-top: -100px; // hidden
}
.menu-visible
{
margin-top: 0px; // visible
}
$("#menu-container").mouseenter(
function()
{
$(".menu").toggleClass('menu-visible');
}
);
Goal: Menu has to show up when cursor is near the menu (not over it).
Problem: Everything is working great, except I can't click/interact with the content that is under the menu-container (the extra 20px space).
Any suggestions? Thanks!
Источник: https://stackoverflow.com/questions/287 ... -detection
Мобильная версия