Streaming live at 10am (PST)

Re-using Interactions for Multiple Nav Menus

#1

Alright, so I’m trying to make a nav with multiple menus and I have the interactions built to show/hide the dropdown menu but I don’t know how to make it so the interactions only react to one menu at a time. Right now everything is tied together so when you click one menu it opens all of them. I tried following this video (https://university.webflow.com/article/reusing-interactions) but I just cannot figure it out.

I’m also trying to show/hide a background overlay when you hover over the menus to dim the content below. I have it somewhat working but it only hides when you hover off of the main dropdown but not if you go above it anywhere.

Here’s the link: https://preview.webflow.com/preview/te-re-design-top-nav-1a9fa6ad43a6573a1f?utm_source=te-re-design-top-nav-1a9fa6ad43a6573a1f&preview=fd0fdc0b6bf6acdde6d874018153c884

Thanks!


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

1 Like
#2

Hello @bbmettler

I see that the nav item and the dropdown are sublings. I will go to the interaction and change the class to only affect sublings with this class.

See here > https://www.useloom.com/share/f021af81949c41e2ae6a8066c272fe5a

Piter :webflow_heart:

#3

Awesome, that part is perfect now. The other part I still can’t quite get working is the background overlay. It won’t close when you hover off of the nav either to the top or if you go off to the right in line with the nav. It does close if you go off the nav drop down menus but I don’t know why it doesn’t close in other areas?

Thanks!