javascript - Disable swipe event when using popup in jquery mobile -


my application has swipeleft , swiperight feature brings navigation menu. code looks this.

$(document).on("swipeleft swiperight", function(swipeevent) {    //my code here } 

in page of app using jquery mobile popup display image. problem have swipeleft , swiperight still works inside popup , brings navigation bar in background , dont want this.

i have used data-dismissible="false" on popup widget not help.

how think should fix problem?

you bind function popupcreate event (http://api.jquerymobile.com/popup/#event-create) nullifies swipeleft swiperight functionality. 1 way have popupcreate update global variable true, , have .on(swipeleft,swiperight) check value of variable before doing anything. set false on popupafterclose event.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -