A
A
Alexander Donov2015-10-02 12:29:39
css
Alexander Donov, 2015-10-02 12:29:39

How not to hide the dropped submenu?

The site cssc.net.cn/en has an interesting menu. It is implemented terribly, but the main plus is that hover li fixes its child ul (i.e., when the mouse is released, the dropped submenu is not hidden). How to implement it in the view menu:

<div id="noid" class="menu">
<ul>

<li>
<a>Пункт 1</a>
<ul>
<li><a>Пункт 1.1</a></li>
<li><a>Пункт 1.2</a></li>
<li><a>Пункт 1.3</a>/li>
</ul>
</li>

</ul>
</div>

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Novikov, 2015-10-02
@web-54

this is done using js - when you hover over the button, the visibility of the submenu is switched.
in your case it will be something like this (jQuery):

$('.menu > ul > li').mouseenter(function(){
$('.menu li ul').fadeOut();
$(this).find('ul').fadeIn();
});

E
Emperio, 2015-10-02
@Emperio

li: hover ul {
display: block;
}

N
Nikita K., 2015-10-02
@bonilka

So it's done in js. Moreover, the child ul is not fixed there, but its contents are replaced with new data.

A
Alexander Petrov, 2015-10-02
@Mirkom63

Maybe not with everything on the topic, but clicks can be done using css.
link to the article
True, here the menu is hidden when you move the mouse away.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question