title: Phonegap and jquery mobile : a href -> Origin null is not allowed by Access-Control-Allow-Origin
body: <p>Im trying to use jquery mobile with phonegap, in a multi-page document.
  Tring to use basic <strong>href</strong> links within the document, gives the <em>Origin null is not allowed by Access-Control-Allow-Origin</em> error which is quite annoying. </p>
  
  <p>This is because the index page is refered to via file:// rather than http:// which webkit interprets as origin null. Has anyone got jquery mobile and phonegap to work in a multi page environment? if so how can you do it? If you add rel=external to the href tags the links work, but of course all the transitions are lost. </p>
  
  <p>Cant find any info on this specific problem on stack overflow or teh internetz.</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  
  &lt;head&gt;
  &lt;title&gt;PhoneGap&lt;/title&gt;
  
  &lt;script type="text/javascript" charset="utf-8" src="phonegap-1.2.0.js"&gt;&lt;/script&gt;   
  &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /&gt;
  &lt;script src="http://code.jquery.com/jquery-1.6.4.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(document).bind( "mobileinit", function(){
          //alert("mobileinit fired");  
          $.support.cors = true;
          $.mobile.allowCrossDomainPages = true;       
      });        
  &lt;/script&gt;   
  &lt;script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  
  function onDeviceReady() {
      navigator.network.isReachable("google.com", reachableCallback, {});
  }
  // Check network status
  function reachableCallback(reachability) {
      // There is no consistency on the format of reachability
      var networkState = reachability.code || reachability;
      var states = {};
      states[NetworkStatus.NOT_REACHABLE]                      = 'No network connection';
      states[NetworkStatus.REACHABLE_VIA_CARRIER_DATA_NETWORK] = 'Carrier data connection';
      states[NetworkStatus.REACHABLE_VIA_WIFI_NETWORK]         = 'WiFi connection';
      if (networkState != 0) online = true;
  }
  var online = navigator.onLine || false;
  
  $(document).ready(function() { 
      $(document).bind('deviceready', function(){
          onDeviceReady()
  })
  // Your main code
  })
  //Now if you about to make an AJAX call to load up some dynamic data, you can easily check to see if you're online
  if(online) {
      } else {
  }
  
  
  &lt;/script&gt;
  
  &lt;/head&gt;
  
      &lt;body&gt;
          &lt;h1&gt;Welcome to PhoneGap&lt;/h1&gt;
      &lt;a href="edit.html"&gt;Edit html&lt;/a&gt;
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>