responsive-nav.js icon indicating copy to clipboard operation
responsive-nav.js copied to clipboard

Allow customisation of the nav-toggle

Open craigmdennis opened this issue 10 years ago • 5 comments

It would be great to be able to change the classes applied to the nav toggle as well as the main navigation element.

craigmdennis avatar Oct 27 '15 17:10 craigmdennis

+1 for this feature.

kush1960 avatar Feb 01 '16 12:02 kush1960

You can do both using customToggle and navClass options.

samikeijonen avatar Feb 01 '16 12:02 samikeijonen

As far as I can tell, there isn't a way to modify the class applied top the js inserted button used to trigger the menu <a href="#" class="nav-toggle" aria-hidden="false">Menu</a> Isn't customToggle for targeting existing html created for the button? And navClass applies a class to the list used for the menu?

I was hoping to replace the class used in the injected a href. Eg. <a href="#" class="nav-other-nav-toggle" aria-hidden="false">Menu</a>

kush1960 avatar Feb 01 '16 14:02 kush1960

Isn't customToggle for targeting existing html created for the button?

Yes you should use customToggle for your own button. And note that it really should be a button, not a link.

And navClass applies a class to the list used for the menu?

Noup, it's for nav itself.

samikeijonen avatar Feb 01 '16 15:02 samikeijonen

Thanks for clarifying.

kush1960 avatar Feb 01 '16 16:02 kush1960