How to switch from different events in Nav List?

I’m currently working on implementing a navigation bar with two distinct dropdowns. My challenge is figuring out how to seamlessly switch between these dropdowns.

Each dropdown should display different content, and I’m looking for a solution to toggle between them dynamically.

I’m doing this correctly as shown in the video below:

Hello @xbrandonpowell,

Looks like you were able to get both the dropdowns working as expected. You seem to be doing it correctly, just keep adding new events to the Nav items

I’m encountering an issue where the entire dropdown is not hiding when I click on the links. I suspect that the click event is attached to the links, and not the dropdown layers. As a result, only one layer of the dropdown is being hidden. How can I ensure that the entire dropdown hides when clicking on the links?

Hello @xbrandonpowell,

To hide the entire dropdown, consider using different states for each dropdown. For example, you can use state.showDropdown for the first dropdown and state.showDropdown1 for the second.

For a visual reference and detailed instructions, please check out the Loom video provided below:

1 Like