baptistebriel / smooth-scrolling

smooth scrolling and parallax effects on scroll
MIT License
612 stars 75 forks source link

scroll callback function added #76

Closed techhahn closed 6 years ago

techhahn commented 6 years ago

Scrolling callback function added for the people who don't override the library and use it as it is. I and my colleagues came across many scenarios where we don't have to extend the library and wanted scroll callback function to do some action on the scroll. Sure we can call requestAnimationFrame and check if the page is scrolling or not, but I felt this more convenient.

baptistebriel commented 6 years ago

Hi @techhahn -- thanks for the PR! This is indeed a feature that some people asked for. It should be updated on npm as well, so feel free to try it out!