I'm working on an iOS app with phonegap. I encountered a problem. It seems that the event device ready is fired after the page (and other AJAX functions) is fired.
Sample code:
Global.init = function() {alert("ready");}
$(function(){
document.addEventListener("deviceready", Global.init, false);
});
$('#landing').live('pageshow', function(){alert('pageshow')});
I will see the alert 'pageshow' before the alert 'ready' (a couple of seconds). Is there anyway to ensure all the JQuery mobile code is executed after the device is ready?