Skip to content

First release

Latest
Compare
Choose a tag to compare
@hidegh hidegh released this 14 Dec 12:53

Initial release for the component.

In it's current stage it's able to work very similarly to the scroll-spy inside bootstrap 5 (so highlighting nav items items based on a match on their href and the scrolling in element id tag).

In addition to the usual scrollspy solutions, we do take in account also that:

  1. the navigation item might have a href (with an anchor tag) to a different page
  2. we might have no active anchor element in view, but still might have a navigation item to the current page (URI / window.location)
  3. and if these all fails, we also do allow to set a default nav item for highlighting

NOTE: when using https://www.jsdelivr.com/package/gh/hidegh/menu-path-and-scroll-spy it also requires a title and a description to enlist the repo.