This plugin is my version of Scrollspy and offers a way to fine tune it's operation.
http://pldrake26.github.io/Scrollspy-mini/
- jquery.scrollspy-mini.js is commented to allow for easy implementation.
- Each nav anchor must have an id for the addClass and removeClass to target.
- Each nav section or div of your website that is being spied on must have an jQuery offset() method to find the top coordinate to compare to the scrollTop() method.
- You must add a comparision statement for each section or div.
- Manually fine tune functionality by adjusting the yPos variable up or down.
- Call the plugin using: $(document).scrollspy(); inside a document ready function.