The Scrollspy component allow you to know where you are on the page.
Just send it the HTML element which is tracked and the class which is added when an element is active.
You can see the example of what you can do on the right of the screen of any page of the docs.
Once HTML was setup, you can activate the scrollspy with this simple code.
Just pass the id of your scrollspy that you want to activate.
|offset||200||Offset between the top of the page and the targeted zone.|
|linkSelector||'a'||The element selector. You can pass specific classes to select specific elements.|
|classes||'active'||The classes which will be added to the corresponding element when you have scrolled to the targeted zone.|
Set the auto mode to automatically detect all the corresponding selectors, and add the classes to the corresponding link.
|ax.scrollspy.setup||Event sent when the scrollspy has been setup.|
|ax.scrollspy.update||Event sent when the scrollspy has been updated.|