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
- Host: GitHub
- URL: https://github.com/codenameyau/skully.js
- Owner: codenameyau
- License: mit
- Created: 2015-11-09T01:46:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-22T01:29:42.000Z (over 10 years ago)
- Last Synced: 2025-01-29T20:19:49.096Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
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
```