1
Vote

Android Device + Webkit

description

Each swipeleft, swipeleftdown, swipeleftup event group and each swiperight swiperightdown swiperightup using the following code triggers 6 events each time a swipe is made for my Andriod device using the default webkit based browser. On the same device with Firefox Mobile the event never triggers. I presume that the reason it is not triggering on Firefox Mobile is that the left and right swipe actions are used by the browser. Using event.preventDefault() simply stops the action period and no event is registered.
 
var swipeleftcnt = 0;
var swiperightcnt = 0;
jQuery('#swipe').bind('swiperight swiperightdown swiperightup', function(event) {
    swiperightcnt++;
    jQuery('#swipe-display').empty().append('swiperight'+': '+swiperightcnt);
});
jQuery('#swipe').bind('swipeleft swipeleftdown swipeleftup', function(event) {
    swipeleftcnt++;
    jQuery('#swipe-display').empty().append('swipeleft'+': '+swipeleftcnt);
});

comments