jQuery wScrollspy is a plugin that listens to the page's scroll position and clicks to activate links.
(c) 2013 Willian Costa Souza - [email protected]
Released under The MIT License.
Hosted at GitHub, or clone from:
git://github.com/willianis4w/jQuery-wScrollspy.git
Insert the necessary elements in your document, after </body>
, e.g.:
<script src="assets/js/jQuery.wScrollspy.min.js"></script>
Remember to include after including the main jQuery library.
Initialise:
// your links' wrapper
$( '#main-header' ).wScrollspy();
Then, all your links beginning with #
are being watched.
classActive: (string) 'active' // class name for your active links