somewebmedia / hc-offcanvas-nav

JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
https://somewebmedia.github.io/hc-offcanvas-nav/
MIT License
336 stars 82 forks source link

Open menu with multiple elements with same toggle class #56

Closed markgenest closed 3 years ago

markgenest commented 3 years ago

This is a an awesome menu!!! Thanks for all the hard work!

I have a question regarding using a toggle class in multiple locations on the page. If you apply a toggle class to multiple elements on the page, the menu should open on any of them. However, the menu only seems to function with a single toggle element, even though there are multiple elements with the same toggle class.

Is there a way to activate the menu with multiple elements with the same toggle class?

Thanks so much!

somewebmedia commented 3 years ago

I've added the possibility of multiple toggles in the latest release. Use the latest version, it should work now.

markgenest commented 3 years ago

Yes! It works!! Thanks so much!!!