I have a working HelloWorld phonegap program with jquery mobile sprinkled in as described here: http://jquerymobile.com/demos/1.1.0/docs/about/getting-started.html. I added a little javascript to this to experiment with Cross Origin Resource Sharing:
<script>
$(document).bind("pageinit", function() {
$.support.cors = true;
$.mobile.allowCrossDomainPages = true;
$.mobile.changePage("http://jquery.com");
});
</script>
This works great on the emulator (2.3), jquery.com is loaded over the jquery mobile demo. However, on actual 2.3 Android devices (T-mobile G2 running Cyanogen, Galaxy SII, Galaxy Player) the changePage() call does nothing.
Try
mobileinitinstead ofpageinit. Because event you bound to is normal jQuery and for jQuery mobile the initialization event is mobileinit.The $.mobile.allowCrossDomainPages option must be set before any cross-domain request is made so we recommend wrapping this in a mobileinit handler.