TouchSwipe Jquery插件,如何添加左右滑动侦听器并启用垂直滚动?

时间:2017-07-05 06:39:20

标签: android jquery cordova

我使用下面的代码来左右滑动。但我不能通过滑动垂直滚动。请帮忙

$(function() {

  $("#div_with_drawer").swipe( {
    //Generic swipe handler for all directions
       swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
            if(direction=='right')
                $('.drawer').drawer('close');
            else if(direction=='left')
                $('.drawer').drawer('open');
        }
    });

});

0 个答案:

没有答案