Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Tracking the scroll delta
- Rx.Observable
- .fromEvent(document, 'scroll')
- .map(e => window.pageYOffset)
- .pairwise()
- .subscribe(pair => console.log(pair)); // pair[1] - pair[0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement