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
335 stars 82 forks source link

add selected menu by default in url #19

Closed vahidalvandi closed 4 years ago

vahidalvandi commented 5 years ago

add selected menu by default in url #

somewebmedia commented 4 years ago

That is on the user to setup in his links.

Example:

<nav id="main-nav">
  <ul>
    <li><a href="#about">About</a></li>
    <li><a href="#ervices">Services</a></li>
    <li><a href="#contact">Contact</a></li>
  </ul>
</nav>

And the nav will pick up those hashes.