I just want to ask if there is a way to change the threshold of the touchmove event? An image will appear in the PhoneGap application. If touchstart triggered, another image will appear. If touchend or touchmove , all images should disappear. Here is my code:
$('.greenApple').on('touchend', function (e){ $('body').find('.active').removeClass('active'); $('body').find('.greenApple').addClass('hidden'); flag = true; return; }); $('.greenApple').on('touchmove', function (e){ $('body').find('.active').removeClass('active'); $('body').find('.greenApple').addClass('hidden'); flag = true; return;
However, the threshold for the number of pixels considered to be touchmove is too small. Often, as soon as I click on the image (without releasing it, touchend does not start), the image disappears because the touchmove event touchmove . Is there a way to change the number of pixels that are considered touchmove ? Or are there other workarounds?
Thanks.
javascript jquery javascript-events cordova
Jeongbebs
source share