I did not find the transition status information in jQuery Mobile, however you can simply add three events: one before and one after the change, and the other when changing the page. Then save in the global variable whether the transition occurs:
window.transitioning = false;
$(document).on("pagebeforechange", function() { transitioning = true; });
$(document).on("pagechange", function() { transitioning = false; });
$(document).on("pagechangefailed", function() { transitioning = false; });
In this example, I create a global variable transitioning, but you can create this variable if you want, for example, by creating a local variable in the dialog handler, rather than using a global variable.
Now you can add your state as follows:
if(!transitioning) {
// Do your stuff
} else {
// Delegate the events by listening for pagechange and then do your stuff
}
source
share