It turned me on too ... I didn't need to use .on ('pageinit'), as suggested in a previous post. Turns out my syntax was correct in my jQuery, but CASE SENSITIVTY was my problem. "swiperight" did not work, but "swipeRight" did! The following code worked for me and also fixed a Swipe problem preventing the document from scrolling up and down in mobile browsers. Be sure to specify the swipeRight and swipeLeft methods separately, and not one common "swipe" class, and you're good to go! * Pay attention to the Exclude Elements line below, noticing that I took a "span" from the list to allow scrolling on a commonly used span element.
$(function() { $('.yourclassname').swipe( { swipeLeft:function(event, direction, distance, duration, fingerCount) {
Victor
source share