Button opens nav menu

I have searched all across the forum but I have not find any solution.
Is there a way to use a button to open or toggle the menu? I have set the hamburger acrros all the breakpoints and I want to use a button to open the menu, as also the hamburgher icon.
Is there a specific toggle or a custom atribute I can set to the button?

@Eldar has a series of tutorials on visibility which covers this.

Visibility - 1. Introduction & Basic Principles
Visibility - 2. Changing Visibility of Blocs
Visibility - 3. Changing Visibility of Brics
Visibility - 4. Changing Visibility of Text Spans
Visibility - 5. Creating Dropdown Menus
Visibility - 6. Grouping Elements
Visibility - 7. Creating Custom FAQ Sections
Visibility - 8. Creating Custom Navigations

Sign up at https://eldargezalov.com

1 Like

Thanks sim, but that’s not what Im looking for, it’s not a visibility issue due this is a nav property. I am using data-toggle parameters to collapse the navbar and it works but not entirely fine.

maybe @Norm could give me a hand:
I set custom attributes on a button to expand the navbar (data-target: .navbar-1, data-toggle: collapse and aria-expanded: false)
This attributes drop down the menu but it’s not the same navbar and behavior as if I press the hamburger

Hey @chicuelo

he way around this is to use the button / link to activate the menu as if it was “clicked”

So add this custom attribute to your link. (remove all the others, you don’t need them)


This can work for buttons or any links. Set the interaction to “None” and add the Custom Attribute.


Works like a charm @Malachiman, thank you very much!!