An open API service indexing awesome lists of open source software.

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

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/