javascript - TouchSwipe - multiple events on one swipe -
i'm using touchswipe jquery plugin mobile version of site. need fire multiple click-events on 1 swipe, - on every 15px of swipe - 1 click. i've googled, found no solution.
thing - i'm using carousel plugin joomla (sigplus), that, unfortunately, doesn't support finger swipe. i'm trying emulate swiping function making touchswipe pressing carousel buttons user on swipe. @ moment have such code:
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 }); });
it works fine, scrolls 1 image in carousel per touch. maybe it's possible restart function after triggering?
thanks
p.s. sorry english
to trigger continuous events, should use swipestatus event instead: http://labs.rampinteractive.co.uk/touchswipe/demos/swipe_status.html
you can trigger next or back, based on distance.
see answer more info: multiple swipe events on element touchswipe
Comments
Post a Comment