README
skrlspy
Scroll spy
Install
npm install --save skrlspy
component install andrepolischuk/skrlspy
Usage
Set sections and nav classes via data-skrlspy
and data-skrlspy-nav
attributes:
<body data-skrlspy=".section" data-skrlspy-nav=".nav">
API
slrlspy(options);
Example:
skrlspy({
section : '.section',
nav : '.nav'
});
Options:
section
- section class or IDnav
- navigation class or IDnavActiveClass
- navigation active children classnamechange
- function called when changing section
Support
- Internet Explorer 8+
- Chrome
- Safari
- Firefox
- Opera
License
MIT