Demonstration and documentation
Notes
- The JS tries to automatically detect active menu item and append class
.active
.
- It's currently used a bit of jQuery, but this could be coded as vanilla JS.
- This pattern is likely of most help for JS-powered pages.