Is there an alternative way, lite, to superfish, to delay the closing of a dropdown menu? When the menu is hovered, it obviously opens, and when the mouse is no longer focused on it, the menu closes. I would like to have a delay in closing this menu. Something similar to superfish.
PSEDIT
Ifoundsomethingsimilartowhatisaskedinthequestion,withsomeconsiderations.It'stheCSS-TRICKS Unhover Intent in JS , which works to some extent. Does not work with more than one dropdown. What can be done to make it more efficient is: Dropdown must maintain the delay, even in the dropdown of the dropdown. But the delay should end if the mouse goes to another main nav item.
#primary_nav_wrap
{
margin-top:15px
}
#primary_nav_wrap ul
{
list-style:none;
position:relative;
float:left;
margin:0;
padding:0
}
#primary_nav_wrap ul a
{
display:block;
color:#333;
text-decoration:none;
font-weight:700;
font-size:12px;
line-height:32px;
padding:0 15px;
font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
}
#primary_nav_wrap ul li
{
position:relative;
float:left;
margin:0;
padding:0
}
#primary_nav_wrap ul li.current-menu-item
{
background:#ddd
}
#primary_nav_wrap ul li:hover
{
background:#f6f6f6
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0
}
#primary_nav_wrap ul ul li
{
float:none;
width:200px
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}
<nav id="primary_nav_wrap">
<ul>
<li class="current-menu-item"><a href="#">Home</a></li>
<li class="has-children"><a href="#">Sub Menu 2</a>
<ul class="sub-menu">
<li><a href="#">Schiller</a></li>
<li><a href="#">Gogol</a></li>
<li><a href="#">Nietzsche</a></li>
<li class="has-children"><a href="#">Schoppenhauer</a>
<ul class="sub-menu">
<li><a href="#">Linspector</a></li>
<li><a href="#">Shakespeare</a></li>
<li><a href="#">Andrade</a></li>
<li class="has-children"><a href="#">Code Geass</a>
<ul class="sub-menu">
<li><a href="#">Shingeki No Kyojin</a></li>
<li><a href="#">Shisekai yori</a></li>
<li><a href="#">No game no life</a></li>
<li><a href="#">One Punch Man</a></li>
<li><a href="#">Nanatsu no Tasai</a></li>
</ul>
</li>
<li><a href="#">Tolstói</a></li>
<li><a href="#">Platão</a></li>
</ul>
</li>
<li><a href="#">Dostoievski</a></li>
<li><a href="#">Immanuel Kant</a></li>
</ul>
</li>
<li><a href="#">Deep Menu</a>
<ul>
<li><a href="#">Sub Menu 1</a></li>
<li><a href="#">Sub Menu 2</a></li>
<li><a href="#">Sub Menu 3</a></li>
<li><a href="#">Sub Menu 4</a>
<ul>
<li><a href="#">Deep Menu 1</a>
<ul>
<li><a href="#">Sub Deep 1</a></li>
<li><a href="#">Sub Deep 2</a></li>
<li><a href="#">Sub Deep 3</a></li>
<li><a href="#">Sub Deep 4</a></li>
</ul>
</li>
<li><a href="#">Deep Menu 2</a></li>
</ul>
</li>
<li><a href="#">Sub Menu 5</a></li>
</ul>
</li>
<li><a href="#">Menu 2</a>
<ul>
<li><a href="#">Sub Menu 1</a></li>
<li><a href="#">Sub Menu 2</a></li>
<li><a href="#">Sub Menu 3</a></li>
</ul>
</li>
<li><a href="#">Menu 3</a>
<ul>
<li class="dir"><a href="#">Sub Menu 1</a></li>
<li class="dir"><a href="#">Sub Menu 2 THIS IS SO LONG IT MIGHT CAUSE AN ISSEUE BUT MAYBE NOT?</a>
<ul>
<li><a href="#">Category 1</a></li>
<li><a href="#">Category 2</a></li>
<li><a href="#">Category 3</a></li>
<li><a href="#">Category 4</a></li>
<li><a href="#">Category 5</a></li>
</ul>
</li>
<li><a href="#">Sub Menu 3</a></li>
<li><a href="#">Sub Menu 4</a></li>
<li><a href="#">Sub Menu 5</a></li>
</ul>
</li>
</ul>
</nav>
References