All Projects → makotot → scrollspy

makotot / scrollspy

Licence: other
scrollspy

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].