Jquery Tools Touch horizontal only disable vertical touch

后端 未结 2 1964
日久生厌
日久生厌 2020-12-17 02:25

I have jquery tools scroller... I like it to have touch option implemented for swipeLeft swipeRight only.

When I use touch: true, it does rotates when swipeUp/Down as

2条回答
  •  隐瞒了意图╮
    2020-12-17 03:21

    I was struggling with the same issue for a while until I found the following fix-

    Initialization-

    var $scroller1 = $('#outer-container1').kinetic({'y':false});
    

    This prevents vertical scroll on the container but does not hand the vertical scroll to the browser scroller.

    Then go to the jquery kinetic source code and comment out the e.preventDefault() for all mouse and scroll action events.

    This hack worked for me. https://github.com/davetayls/jquery.kinetic/issues/33

提交回复
热议问题