Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leaysgur/prlx
Safe way to parallax your site!
https://github.com/leaysgur/prlx
Last synced: 24 days ago
JSON representation
Safe way to parallax your site!
- Host: GitHub
- URL: https://github.com/leaysgur/prlx
- Owner: leaysgur
- License: mit
- Created: 2015-03-26T09:12:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T07:42:10.000Z (over 4 years ago)
- Last Synced: 2024-04-15T07:12:04.757Z (7 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prlx
Safe way to parallax your site!See https://leader22.github.io/prlx/index.html?win=0
```javascript
// これを
window.addEventListener('scroll', function() {
var posY = window.scrollY;
// do something.
}, false);// こうしようという試み
var prlx = new Prlx({ raf: true });
// var prlx = new Prlx({ fps: 30 });prlx.onScroll(function(pos) {
var posY = pos.y;
// do something.
});// スタートするまで何もしないよ
prlx.start();// いらなくなったら
prlx.dispose();
```