stutrek/scrollmonitor

on scroll event

Colir opened this issue · 1 comments

Colir commented

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 !

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.