https://github.com/pirxpilot/scroll-hilo
Adds CSS classes based on scroll position
https://github.com/pirxpilot/scroll-hilo
Last synced: 7 months ago
JSON representation
Adds CSS classes based on scroll position
- Host: GitHub
- URL: https://github.com/pirxpilot/scroll-hilo
- Owner: pirxpilot
- License: mit
- Created: 2013-10-16T03:18:55.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2017-02-23T03:13:50.000Z (over 9 years ago)
- Last Synced: 2025-03-13T16:34:12.330Z (over 1 year ago)
- Language: HTML
- Homepage: http://pirxpilot.github.io/scroll-hilo
- Size: 8.79 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
- License: License.txt
Awesome Lists containing this project
README
# scroll-hilo
Add .bottom and .top classes to document body when page is all the way up or down.
Check out the [live demo](http://pirxpilot.github.io/scroll-hilo)
## Installation
Install with [npm]:
$ npm install scroll-hilo
## API
```javascript
require('scroll-hilo')();
```
`document.body` will have `.top` class when the top of the page is displayed
and the `.bottom` class when the bottom of the page is displayed
## License
MIT
[npm]: https://www.npmjs.org/