Reputation: 19826
I have the following code that tries to detect swipes left and right:
$('#my_view').bind('pageinit', function() {
$( '#my_view' ).on( "swipeleft swiperight", "#myItem", function( event ) {
var listitem = $( this ),
dir = event.type === "swipeleft" ? "left" : "right";
console.log("Detected swipe!!!! " + dir);
});
});
However this only detects the right swipe and never detects a left swipe, can anyone explain why?
Upvotes: 2
Views: 6883