Prinzhorn / skrollr

Stand-alone parallax scrolling library for mobile (Android + iOS) and desktop. No jQuery. Just plain JavaScript (and some love).
http://prinzhorn.github.io/skrollr/
MIT License
18.53k stars 3.5k forks source link

Custom reference point instead of window.scrollTop #378

Open floriancapelle opened 10 years ago

floriancapelle commented 10 years ago

I want to use a custom scrollbar, and the current public API is almost designed for interaction to set/get this point of reference. I want skrollr to react the same as if the user is scrolling natively (when setting/updating the reference point).

That's a feature request.

Prinzhorn commented 10 years ago

Workaround:

use mobileCheck: function() {return true;} and call setScrollTop(X) every time your custom scrollbar changes, where X is the new offset. Don't use skrollr-body.

floriancapelle commented 10 years ago

Nice, works. Thank you very much!