Superfish submenu showing with hover instead of click

KernelLabs's picture
KernelLabs
Thu, 05/28/2015 - 09:35
#1
Superfish submenu showing with hover instead of click

Hello there,

I wish I could display submenus of my Superfish main menu by hovering primary links and not clicking on them.
Can you give me hints about it ?

Regards

phuonght's picture
phuonght
Sat, 05/30/2015 - 05:04

Hi,

You can write a css yourself to edit it, or you can send us your site url, admin and FTP accounts (forum link as well) via this email: [email protected] so we can help you

KernelLabs's picture
KernelLabs
Mon, 06/01/2015 - 12:13

Ok, I couldn't figure (and still can't) where is defined the click or focus behaviour of this since the superfish menu you include in MD Alpine is a mix of superfish and bootstrap.

Indeed, adding something this works :

.navbar .dropdown-toggle:hover+.dropdown-menu, .navbar .dropdown-menu:hover {
display: block !important;
visibility: visible !important;
}

But I couldn't find a way to make the submenu appear with a transition of some kind.

Thx anyway

phuonght's picture
phuonght
Tue, 06/02/2015 - 22:20

There is a suggestion. 

In file style.css, insert the following:

@media screen and (min-width: 780px) {

 .navbar .dropdown:hover .dropdown-menu{

 display: block;

 }

}

KernelLabs's picture
KernelLabs
Wed, 06/03/2015 - 17:52

Your solution won't work for 2 reasons :

- submenus (.dropdown-menu) are hidden two simultaneous way: display: none; and visibility: hidden; So you have to add display: block; but also visibility: visible; to counter that.
- the two css properties are applied as inline styles on .dropdown-menu HTML element, so these styles are applied prior to any properties we define to counter that in a stylesheet like style.css. The only way to make your code applied in priority is to force it with !important instructions like I've done.

To conclude, your code, with my adds, could work only when primary menu item is hovered but as soon as you move the mouse in the submenu, it disappears since you stop hovering the primary link. That's why I apply the same properties on the submenu itself when hovered so that it remains open.

Thanks anyway.

phuonght's picture
phuonght
Thu, 06/04/2015 - 00:40

Could you send us your site url, admin account (forum link as well) via email: [email protected]? We would like to help you.
And some screenshots are good too.

KernelLabs's picture
KernelLabs
Sun, 07/12/2015 - 07:52

I forgot to ask :

Now the submenus are showing on hover.
But the parent menu item link is not working. Do you have an idea to make it work properly ?

phuonght's picture
phuonght
Sun, 07/12/2015 - 22:41

So,

Please send us your information to our email. We would like to check it for you.

phuonght's picture
phuonght
Wed, 07/15/2015 - 23:27

Have you added anchor yet?

We checked your menu S'inscrine had anchor to #team, but we found no id team on your site.

We think it cause problem your menu not working.

KernelLabs's picture
KernelLabs
Thu, 07/16/2015 - 04:17

Hello,

You are right, this anchor wasleading nowhere. We removed it but as you can see the problem is still there :

- 'Pros' menu item is a link to a standalone page and works
- '<username>' menu item (showing when your logged) is a link to the /user page, it has a submenu (with 'Deconnexion' link) and does not work

We guess something is blocking the click event, perhaps a jquery event.preventDefault() somewhere, but can't figure where.

phuonght's picture
phuonght
Thu, 07/16/2015 - 23:18

The menu was designed to work like that.

Parent menu item which has submenu can not link to other page, because when setting redirect link, children menus can not be appear on mobile.

KernelLabs's picture
KernelLabs
Fri, 07/17/2015 - 06:10

Understood, thanks for your time

Log in or register to post comments
Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.