Clone or download
Latest commit 3fb560f Nov 7, 2016
Permalink
Failed to load latest commit information.
build Merge pull request #9 from makotot/offsettop Nov 7, 2016
css + getcontents Feb 9, 2015
src/js Merge pull request #9 from makotot/offsettop Nov 7, 2016
.editorconfig init Dec 26, 2014
.eslintrc mv dist, rm umd Jul 23, 2015
.gitignore update Feb 19, 2015
.npmignore mv dist, rm umd Jul 23, 2015
Gruntfile.js Fix #5 Dec 4, 2015
README.md typo Feb 5, 2016
bower.json 0.1.3 Nov 7, 2016
index.html mv dist, rm umd Jul 23, 2015
jquery.html mv dist, rm umd Jul 23, 2015
package.json 0.1.3 Nov 7, 2016

README.md

ScrollSpy

npm version bower version DevDependencies License

Scrollspy library.

Demo

http://codepen.io/makotot/pen/YyRXOQ

Installation

npm

$ npm install --save scrollspy-js

bower

$ bower install scrollspy

Usage

<div id="js-scrollspy">
  <ul class="js-scrollspy-nav">
    <li><a href="#internal-link">internal-link</a></li>
    <li><a href="#...">...</a></li>
    <li><a href="#...">...</a></li>
    <li><a href="#...">...</a></li>
  </ul>
  ...
  <div>
    <div id="internal-content"></div>
    ...
  </div>
</div>
...
<script src="./bower_components/scrollspy.js"></script>
var spy = new ScrollSpy('#js-scrollspy', {
  nav: '.js-scrollspy-nav > li > a',
  className: 'is-inview'
});

License

MIT