Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In order to use phonegap along with jquery mobile, you need to use it like this</p> <pre><code>&lt;head&gt; &lt;title&gt;Index Page&lt;/title&gt; &lt;!-- Adding viewport --&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt; &lt;meta name="viewport" content="width=device-width, user-scalable=no"&gt; &lt;!-- Adding jQuery scripts --&gt; &lt;script type="text/javascript" src="jquery/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;!-- Since jQuery Mobile relies on jQuery core's $.ajax() functionality, $.support.cors &amp; $.mobile.allowCrossDomainPages must be set to true to tell $.ajax to load cross-domain pages. --&gt; &lt;script type="text/javascript"&gt; $(document).bind("mobileinit", function() { $.support.cors = true; $.mobile.allowCrossDomainPages = true; }); &lt;/script&gt; &lt;!-- Adding Phonegap scripts --&gt; &lt;script type="text/javascript" charset="utf-8" src="cordova/cordova-1.8.0.js"&gt;&lt;/script&gt; &lt;!-- Adding jQuery mobile scripts &amp; CSS --&gt; &lt;link rel="stylesheet" href="jquerymobile/jquery.mobile-1.1.0.min.css" /&gt; &lt;script type="text/javascript" src="jquerymobile/jquery.mobile-1.1.0.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;script type="text/javascript"&gt; // Listener that will invoke the onDeviceReady() function as soon as phonegap has loaded properly document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { navigator.splashscreen.hide(); document.addEventListener("backbutton", onBackClickEvent, false); // Adding the back button listener } &lt;/script&gt; &lt;body&gt; &lt;div data-role="page" id="something" data-ajax="false"&gt; &lt;script type="text/javascript"&gt; $("#something").on("pageinit", function(e) { }); $("#something").on("pageshow", function(e) { }); $("#something").on("pagebeforeshow", function(e) { }); &lt;/script&gt; &lt;div data-role="header"&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload