https://github.com/appleple/nice-spy
A library used to update classnames of links based on scroll position
https://github.com/appleple/nice-spy
Last synced: 9 months ago
JSON representation
A library used to update classnames of links based on scroll position
- Host: GitHub
- URL: https://github.com/appleple/nice-spy
- Owner: appleple
- License: mit
- Created: 2018-02-13T09:40:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-28T06:24:59.000Z (about 8 years ago)
- Last Synced: 2025-04-28T05:34:52.008Z (about 1 year ago)
- Language: JavaScript
- Size: 68.4 KB
- Stars: 5
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nice Spy
A library used to update classnames of links based on scroll position
## Demos
## Installation
- [npm](https://www.npmjs.com/package/nice-spy)
- [standalone](https://raw.githubusercontent.com/appleple/nice-spy/master/js/nice-spy.js)
via npm
```shell
npm install nice-spy --save
```
or yarn
```shell
yarn add nice-spy
```
### Basic
```html
section1
section2
section3
```
```js
new NiceSpy('.js-nicespy', {
offsetTop: 20,
});
```