I want to do something like this:
$(document).on(\"pagebeforeshow\", \"#myPage\", function(event){
if(condition){
//I need to do something here to sto
I think the best way to do this would be to have the page hidden by default, and only show it if it passes the conditional. So it would look like this
CSS:
#myPage {
display: none;
}
JS:
$(document).on("pagebeforeshow", "#myPage", function(){
if(condition){
$.mobile.changePage("example.jsp");
} else {
$('#myPage').show()
}
});