I wrote a mobile web application that uses jQuery for mobile swipeleft and swiperight, but they do not work on Samsung Galaxy S4 running Android 4.2.2. Running a web application in a standard web browser or in Chrome has the same problem: swipe events were not detected.
The following shows how I try to detect events that work perfectly on other devices on which I tested it, even on Android devices (but not on Android 4.2.2):
$('#showImage').on("swipeleft", function (event) { if (currentScale != initialScale) return; if (currentPage < maxPage) { ++currentPage; img.src = document.getElementById("page" + zeroPad(currentPage, 2) + "url").value; } }); $('#showImage').on("swiperight", function (event) { if (currentScale != initialScale) return; if (currentPage > 1) { --currentPage; img.src = document.getElementById("page" + zeroPad(currentPage, 2) + "url").value; } });
Is there anything I can do, by code, to capture these events in Android 4.2.2?
source share