Closed hasancruk closed 10 months ago
How is apple doing this on their own site?
Looks like they are just doing it with scroll
event:
A simple polyfill kinda works: https://github.com/hasancruk/cruk-carousel/commit/c2a6c1ad3ea878c9d3885f8b23bcd07afd354750
But it doesn't handle things like touch event start and stop correctly. I like the scrollyfills implementation, so I'm going to copy and paste that into the code.
That polyfill handles touch events on mobile a lot better but on desktop it's about the same. Scrollend performs way better on something like Firefox or Chrome.
Try and write a simple polyfill that listens for the
scroll
event and then emits thescrollend
event after a set debounce.Resources