jq-nav-scroll-spy
jquery plugin that can spy scroll and switch nav automatically
DEMO
https://fedutilities.github.io/jq-nav-scroll-spy/examples/
Installation
jq-nav-scroll-spy depends on jQuery 1.8 or higher.
NPM
npm install jq-nav-scroll-spy --save
standalone script
<script src="https://raw.githubusercontent.com/fedutilities/jq-nav-scroll-spy/master/dist/jq.nav-scroll-spy.js"></script>
Usage
The simplest and most common use of jqNavScrollSpy looks like this:
$(document).jqNavScrollSpy(configs);
Configs
key | default | description |
---|---|---|
navItems | .nav-item |
nav items that you used to automatically switch |
spyItems | .spy-item |
items that you spy scroll and scroll it |
easing | swing | jquery animation functions |
speed | 550 | animation speed |