Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery and Cordova index page loads wierdly
    primarykey
    data
    text
    <p>I used suggestion from <a href="https://stackoverflow.com/questions/10945643/correct-way-of-using-jquery-mobile-phonegap-together">Correct way of using JQuery-Mobile/Phonegap together?</a> and my index page looks like this:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;meta name="format-detection" content="telephone=no" /&gt; &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /&gt; &lt;link rel="stylesheet" type="text/css" href="css/bootstrap.css" /&gt; &lt;title&gt;InforMEA&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; alert('About to use deferred .. '); var dd = $.Deferred(); var jqd = $.Deferred(); $.when(dd, jqd).done(doInit); $(document).bind('mobileinit', function () { jqd.resolve(); }); &lt;/script&gt; &lt;script type="text/javascript" src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; alert('About to add device listener for cordova .. '); alert('is dd '+dd); document.addEventListener('deviceready', deviceReady, false); function deviceReady() { dd.resolve(); } function doInit() { alert('Ready'); } &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The problem is the alert('Ready') is never called and alert('About to use deferred .. '); is called twice. Also I see a text/image called "Loading" at bottom that I cannot figure out the source of. I am not at all sure what's wrong. Please help. </p> <p>I tried to remove jQuery and Cordova code one by one and individually they work fine - I mean I get alerts where I expect but cannot figure out why this doesn't work together.</p> <p>Also - why do we need such a coordination between the 2 frameworks ? I understand we need both of the frameworks to load completely but why would they not load completely if I just did:</p> <pre><code>&lt;script src="http://code.jquery.com/jquery-1.8.3.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"&gt;&lt;/script&gt; &lt;script src="./cordova.js"&gt;&lt;/script&gt; &lt;!-- start writing my code after this point --&gt; </code></pre> <p>I am sure there is something about loading of jQuery and Cordova that I don't understand. Please advise what should I read.</p> <p>Thanks in advance</p>
    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.
 

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