lukehaas / Scrollify

A jQuery plugin that assists scrolling and snaps to sections.
MIT License
1.8k stars 578 forks source link

Disable scroll on mobile but keep "instant move" buttons #401

Open pandalion opened 4 years ago

pandalion commented 4 years ago

Hi, I don't know if this is possible. On mobile I want to disable the physical scrolling action, because I have content that needs to scroll within the view (like an inner scrollable div), therefore I don't want the scroll action to change sections.

I can disable this fine with scrollify.disable() on window resize, not a prob.

However I have back and forth buttons, that go between slides with $.scrollify.instantNext(); and $.scrollify.instantPrevious(); I really want to still use these on mobile but I am not sure how to.

I am considering enabling scrollify only when I press the button, but then I have to disable it again right away, is there a better way? Thanks!