I’m using http://labs.skinkers.com/touchSwipe/ plugin for touch events.
Main problem is when I attach swipe event on wrapper element, all other events are prevented. Work on desktop browser but not on ipad.
I tried with stop propagation on target element but still have a problem.
_pager.prototype.initialize = function () {
"use strict";
var base = this;
//cursorPosition();
base.$container.swipe({
swipeUp : function (e, direction, distance, duration, fingerCount) {
if ($(event.target).hasClass('inner-wrapper')) {
base.$container.transition({ y : -674 }, 500, 'out')
}
},
swipeDown : function (e, direction, distance, duration, fingerCount) {
if ($(event.target).hasClass('inner-wrapper')) {
base.$container.transition({ y : 0 }, 500, 'out')
}
}
});
}
Fixed with css class noSwipe which excluded elements for swipe.