scroll-spy
1.0.3 • Public • Published Scroll-spy
A light weight scroll spy library in vanilla js.
Demo
demo
Installation
bower
$ bower install scroll-spy --save
npm
$ npm install scroll-spy --save
Usage
scrollSpy.init({
nodeList: document.querySelectorAll('.link')
activeClassName: 'active',
scrollTarget: document
});
nodeList :
- With vanilla js:
document.querySelectorAll('.toc-link')
- With jQuery:
$('.toc-link')
License
MIT
Package Sidebar
Install
Weekly Downloads