Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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!

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();
```