How can I monitor scroll position while scrolling in Safari on iOS?

前端 未结 6 1126
梦毁少年i
梦毁少年i 2021-02-05 03:58

I currently use $(window).bind(\'scroll\', foo); to monitor $(window).scrollTop() and do stuff to create a parallax effect.

In all desktop brow

6条回答
  •  醉话见心
    2021-02-05 04:33

    As I know there is no javascript execution while scrolling on the most mobile devices. There are some workarounds (f.e. iscroll) out there. Iscroll is using css-technique "transform". But there is no way to execute javascript while scrolling. I suppose the smoothe scrolling-algorithm is too expensive.

提交回复
热议问题