Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You will solve your problems using something like this:</p> <pre><code> &lt;script&gt; $('#pageDescription').click(function(){ $('yourdiv').html(content); $.mobile.changePage('#pageList','slide'); }); $('#pageList').click(function(){ $('yourdiv').html(content); $.mobile.changePage('#pageDescription','slide'); }); &lt;/script&gt; &lt;body&gt; &lt;div data-role="page" id="pageDescription"&gt; //Your html from description.html &lt;/div&gt; &lt;div data-role="page" id="pageList"&gt; //Your html from list.html &lt;/div&gt; &lt;/body&gt; </code></pre> <p>See more info: <a href="http://jquerymobile.com/demos/1.2.0/docs/pages/page-anatomy.html" rel="nofollow">http://jquerymobile.com/demos/1.2.0/docs/pages/page-anatomy.html</a></p> <p>Note: You will don't forget to prepare your back button!</p> <p>NEW CODE:</p> <pre><code>&lt;script&gt; var oldHtml; $('div li a').click(function(){ oldHtml = $('yourdiv').html(); $('yourdiv').html(content); $.mobile.changePage('#pageDescription','slide'); }); $('a[data-icon=back]').click(function(){ $('yourdiv').html(oldHtml); }); &lt;/script&gt; &lt;body&gt; &lt;div data-role="page" id="pageDescription"&gt; //Your html from description.html &lt;/div&gt; &lt;div data-role="page" id="pageList"&gt; &lt;div data-role="header"&gt; &lt;a data-role="button" data-icon="back" data-iconpos="notext"&gt;&lt;/a&gt; &lt;/div&gt; //Your html from list.html like this &lt;ul&gt; &lt;li&gt;&lt;a&gt;link1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a&gt;link2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/body&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.
    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