Is there a way to disable swipe events?

1 posts, 0 answers
  1. M
    M avatar
    4 posts
    Member since:
    Oct 2012

    Posted 10 Nov 2012 Link to this post

    I'm using a ScrollView as a carousel to house some questions and need to disable swipe events for it (I'm using "next" and "previous" buttons to control it). The problem I'm coming across is that I have a jQuery-UI slider inside the ScrollView, but when I try to change the slider value, it starts to move the ScrollView to the next "page".

    I was hoping there was a native way to disable "swipe to move", but it doesn't appear that there is.

    I've played around with catching the events on the ScrollView pages, but haven't been able to get something that works on an actual device:
    $('#scrollview-container [data-role="page"]').on('mousedown', function(e) {
         console.log('mousedown');
         e.stopImmediatePropagation();
     });
     $('#scrollview-container [data-role="page"]').on('touchstart', function(e) {
         console.log('touchstart');
         e.stopImmediatePropagation();
     });

    Any ideas or help would be appreciated.

Back to Top