我将TouchSwipe jQuery插件用于我网站的移动版本。我需要启动多个点击-事件在一个滑动,类似-在每15便士的滑动-一次点击。我搜索过,但没有找到解决办法。
问题是-我使用旋转木马插件Joomla (sigplus),不幸的是,不支持手指滑动。我试图模仿滑动功能,使TouchSwipe按下旋转木马按钮的用户在滑动。目前我有这样的代码:
jQuery(function($) {
$(".s2").swipe({
excludedElements: "button, input, select, textarea, .noSwipe",
swipeLeft:function(event, direction, distance, duration, fingerCount) {
$( '.boxplus-next' ).click();
},
swipeRight:function(event, direction, distance, duration, fingerCount) {
$('.boxplus-prev').click();
},
triggerOnTouchEnd:false,
threshold:15
});
});它工作得很好,但是每次触摸只能滚动一个旋转木马图像。也许触发后重新启动功能是可能的?
谢谢
抱歉,我的英语
发布于 2015-02-16 18:52:12
要触发连续事件,您应该使用swipeStatus事件来代替:status.html
然后可以根据距离触发next或back。
有关更多信息,请参见以下答案:Multiple swipe events on an element with TouchSwipe
https://stackoverflow.com/questions/25354392
复制相似问题