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

https://github.com/codenameyau/skully.js

:package: Vanilla JS scroll event handlers
https://github.com/codenameyau/skully.js

Last synced: over 1 year ago
JSON representation

:package: Vanilla JS scroll event handlers

Awesome Lists containing this project

README

          

# skully.js

Native JS scroll event handlers.

### Examples

```javascript
'use strict';

// Listens when scrolling to the top of the page.
skully.onPageTop(function() {
alert('top');
});

// Listens when scrolling past a position, 400 in this case.
skully.onPagePosition(function() {
alert('middle');
}, 400);

// Listens when scrolling to the bottom of the page.
skully.onPageBottom(function() {
alert('bottom');
});
```

### Generate Build

```bash
# sudo npm install -g uglify-js
uglifyjs --compress --mangle -o build/skully.min.js -- src/skully.js
```