A lightweight jQuery plugin for the navigation on one-page sites. Adds smooth scrolling when clicking on the navigation and automatically selects the correct navigation items as you are scrolling through the different sections.
The plugin still works even if you add additional content to the page after the fact that changes the position of each section.
Sample Markup:
Example Usage with Defaults:
If you want the hash to change when a user clicks on the navigation, then change the changeHash options to true.
If you want to filter items out of your navigation then pass in a selector to the filter option.
Filter Example:
Offset
In a previous version, there was an offset option to pass into the JavaScript. This was abandoned in favor of a CSS-only solution which simplified the code and makes it easier to handle responsively. Example
If you are having issues with iOS devices
If clicking a link in the nav makes the rest of the links unclickable until you scroll, you can solve it in this hacky way:
Found the solution here