1

I have a basic JQM page which displays a left side sliding menu when swiping (like the facebook mobile app). It worked fine until I started using scrollview (to properly keep the header fixed). The swipe event is not triggered when I swipe over my page content (it still works if I swipe on the header).

$('.ui-page-active').live("swiperight", function() {
    if (!menuStatus) {  
        showMenu();
    }
}); 

Does anyone has any idea on how to make it work?

Cheers!

PBN
  • 103
  • 1
  • 5

1 Answers1

0

I think you might find that the event is consumed in the scrollview control. You can override the javascript handler against that control to allow it to keep bubbling.

To override the function you can use this technique: Overriding a JavaScript function while referencing the original

Having a quick look at the file, it looks like this method could hold clues as to what you want:

_handleDragMove: function(e, ex, ey)

specifically:

var svdir = this.options.direction; if (!this._directionLock)

I was using the version of scrollview shown here: http://jquerymobile.com/test/experiments/scrollview/scrollview-nested.html

Community
  • 1
  • 1
Dessus
  • 2,147
  • 1
  • 14
  • 24