I’m trying a menu on hover interaction that opens a second menu tier. Only issue is the second tier doesn’t stay open when I hover off the first menu link. I’d like a hover over a click if possible.
You would be better off restructuring your content in such a way that both main menu items and their corresponding secondary menu elements are inside of the same div. Then you will put two interactions - one for the main menu item which will open secondary nav, second - on the wrapper containing both main nav and it’s children menu items - you will put hover out interaction that will close the secondary menu.
Currently I have the menus set up as rows, rather than columns. I’m not sure how to configure the secondary menu to be in the same div as the primary menu without them all overlapping and having to mess wth z-index layers.
I tried to implement this using Dropdown component and got it to work, however the area of hovering was fiddly and not straightforward for the user.
At the moment I’ve changed the menu to be on click instead of hover, but it’s not as nice on desktop. I’d be open to a coded approach if not too complex
This is mighty handy, and I’ll rebuild my menu around your example, which is structured way better than my original attempt. Hopefully others wanting to build a side-by-side menu will find this helpful.
I’ve had a go at building your example div-for-div and I’ve almost got it working, except something is making all the second menu items appear when I hover over the first menu items, and they also don’t disappear on hover out. I’ve looked at the interactions a bunch of times but can’t see where I’m going wrong.
The ix on the parent div (div 26) containing both primary and secondary nav should target children, not siblings.
Oh and you should not use the same class for the secondary nav as your main nav! I know I derped myself in this regard yesterday so it’s not your fault Just duplicate the text class on secondary nav to keep the style but remove the interaction from them.