Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Mobile & PhoneGap deviceReady() not fired
    primarykey
    data
    text
    <p>i am trying to create a new Android project with PhoneGap 1.3.0. and JqueryMobile. But te problem is, if i use Only Phone Gap test code Phone Gap works! DeviceReady function is fired. Please look the examles </p> <pre><code>&lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;title&gt;Test Page&lt;/title&gt; &lt;link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.0.css" /&gt; &lt;link rel="stylesheet" href="docs/assets/css/jqm-docs.css" /&gt; &lt;link rel="stylesheet" href="docsdemos-style-override.css" /&gt; &lt;script type="text/javascript" src="jquery.mobile/jquery-1.6.4.min"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="jquery.mobile/jquery.mobile-1.0.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8"&gt; var onDeviceReady = function() { document.getElementById("devready").innerHTML = "OnDeviceReady fired."; }; function init() { document.addEventListener("deviceready", onDeviceReady, true); } &lt;/script&gt; &lt;/head&gt; &lt;body &gt; &lt;div data-role="page" id="konum" data-theme="a"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Position&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;p&gt;APP will go here.&lt;/p&gt; &lt;p&gt; &lt;span id="devready"&gt;DeviceReady() Not Fired.&lt;/span&gt; &lt;/p&gt; &lt;/div&gt; </code></pre> <p>But i want to use jQuery paging functionality. And the result: Deviceready not fired. What is the problem. How it is possible to use both PhoneGap javascript codes and jQuery library.</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; &lt;title&gt;Test Page&lt;/title&gt; &lt;link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.0.css" /&gt; &lt;link rel="stylesheet" href="docs/assets/css/jqm-docs.css" /&gt; &lt;link rel="stylesheet" href="docsdemos-style-override.css" /&gt; &lt;script type="text/javascript" src="jquery.mobile/jquery-1.6.4.min"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="jquery.mobile/jquery.mobile-1.0.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" charset="utf-8"&gt; var onDeviceReady = function() { document.getElementById("devready").innerHTML = "OnDeviceReady fired."; }; function init() { document.addEventListener("deviceready", onDeviceReady, true); } &lt;/script&gt; &lt;/head&gt; &lt;body &gt; &lt;div data-role="page" id="home" data-theme="a"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Home&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;div data-role="content" id="twitList" &gt; something will go here &lt;/div&gt; &lt;/div&gt; &lt;div data-role="footer" data-id="foo1" data-position="fixed"&gt; &lt;div data-role="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#home" id="home" data-icon="custom"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#about" id="about" data-icon="custom"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#konum" id="konum" data-icon="custom"&gt;Position&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#contact" id="contact" data-icon="custom"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!------page seperator --------&gt; &lt;div data-role="page" id="about" data-theme="a"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;About&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;p&gt;Hoopp! &lt;a href="#home"&gt;Back&lt;/a&gt;&lt;/p&gt; &lt;/div&gt; &lt;div data-role="footer" data-id="foo1" data-position="fixed"&gt; &lt;div data-role="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#home" id="home" data-icon="custom"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#about" id="about" data-icon="custom"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#konum" id="konum" data-icon="custom"&gt;Position&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#contact" id="contact" data-icon="custom"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;!------page seperator --------&gt; &lt;div data-role="page" id="konum" data-theme="a"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Position&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;p&gt;APP will go here.&lt;/p&gt; &lt;p&gt; &lt;span id="devready"&gt;DeviceReady() Not Fired.&lt;/span&gt; &lt;/p&gt; &lt;/div&gt; &lt;div data-role="footer" data-id="foo1" data-position="fixed"&gt; &lt;div data-role="navbar"&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="#home" id="home" data-icon="custom"&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#about" id="about" data-icon="custom"&gt;About&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#konum" id="konum" data-icon="custom"&gt;Position&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#contact" id="contact" data-icon="custom"&gt;Contact&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>Thanks,</p>
    singulars
    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.
 

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