Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery mobile page link not working
    primarykey
    data
    text
    <p>In my jQuery mobile (v 1.2) web site, I have several separate pages (i.e. each page has one header, content and footer). The problem is I can't link the pages. The following line is not working. <code>&lt;a href="anotherpage.html"&gt;Another Page&lt;/a&gt;</code> shows "Error loading page". </p> <p>If I add <code>rel="external"</code> to the <code>&lt;a&gt;</code> element, it works. However, it turns off the automatic loading via Ajax. But I want to use the Ajax loading as well as keep the pages separate. Just wondering whether it's possible.</p> <p><strong>Code Page 1</strong></p> <pre><code>&lt;!DOCTYPE html&gt; &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;Single page template&lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.8.2.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role="page"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Page 1&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; &lt;a href="b.html"&gt; click me&lt;/a&gt; &lt;/div&gt; &lt;div data-role="footer"&gt; &lt;h4&gt;Footer content&lt;/h4&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p><strong>Code Page 2</strong></p> <pre><code> &lt;!DOCTYPE html&gt; &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;Single page template&lt;/title&gt; &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /&gt; &lt;script src="http://code.jquery.com/jquery-1.8.2.min.js"&gt;&lt;/script&gt; &lt;script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"&gt; &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div data-role="page"&gt; &lt;div data-role="header"&gt; &lt;h1&gt;Page 2&lt;/h1&gt; &lt;/div&gt; &lt;div data-role="content"&gt; page 2 content &lt;/div&gt; &lt;div data-role="footer"&gt; &lt;h4&gt;Footer content&lt;/h4&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    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.
    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