stutrek / scrollmonitor

A simple and fast API to monitor elements as you scroll
MIT License
3.3k stars 243 forks source link

on scroll event #85

Open Colir opened 5 years ago

Colir commented 5 years ago

Hi. I would like to know if there a method to use the 'on scroll' function from scrollMonitor. The idea is to use it for create a custom parallax effect rather than coding another scrolling event handler. thank you, and especially thank for this lib !

stutrek commented 5 years ago

Check out scrollmonitor-parallax, the docs aren't great but it may do what you need.

There's no way with the library to receive a scroll event, but you can use it to add and remove scroll listeners as needed and use it to read the scroll position.