Disable overscroll in iOS Safari

前端 未结 2 1104
孤独总比滥情好
孤独总比滥情好 2021-02-06 08:03

How can I prevent overscroll in Safari iOS? I would use the touch gesture for navigate on a site but I can\'t.

I tried this:

$(window).on(\'touchstart\',         


        
2条回答
  •  佛祖请我去吃肉
    2021-02-06 08:18

    This Should be the easiest way to accomplish this:

    $(function() {
        document.addEventListener("touchmove", function(e){ e.preventDefault(); }, false);
    });
    

    Hope this helps.

    Best.

提交回复
热议问题