Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You could try something like this:</p> <ul> <li><a href="http://jsfiddle.net/sJdfy/4/" rel="nofollow">http://jsfiddle.net/sJdfy/4/</a></li> </ul> <p>JS</p> <pre><code>$('#page_3').live('pageshow',function(event, ui) { // refresh specific element $('#refresh').val(''); }); $('#page_2').live('pageshow',function(event, ui) { // refresh all elements var allInputs = $(':input'); allInputs.val(''); }); </code></pre> <p>HTML</p> <pre><code>&lt;div data-role="page" id="page_1" &gt; &lt;div data-role="content" name="contentlogin"&gt; &lt;a href="#page_2" data-role="button" id="login"&gt;Navigate to page 2&lt;/a&gt; &lt;a href="#page_3" data-role="button"&gt;Navigate to page 3&lt;/a&gt; Yeah Page 1 &lt;/div&gt; &lt;/div&gt; &lt;div data-role="page" id="page_2" &gt; &lt;div data-role="content" name="contentlogin"&gt; &lt;a href="#page_1" data-role="button"&gt;Navigate to page 1&lt;/a&gt; &lt;!-- Some Form elements are there --&gt; Hello we are on Page 2&lt;br /&gt;Refresh All Elements&lt;br /&gt;&lt;br /&gt; &lt;label for="basic1"&gt;Text Input 1 (Refresh):&lt;/label&gt; &lt;input type="text" name="name1" id="basic1" value="" /&gt; &lt;label for="refresh1"&gt;Text Input 2 (Refresh):&lt;/label&gt; &lt;input type="text" name="name21" id="refresh1" value="" /&gt; &lt;br /&gt; Enter in some values, Navigate to Page 1 and back to Page 2 &lt;/div&gt; &lt;/div&gt; &lt;div data-role="page" id="page_3" &gt; &lt;div data-role="content" name="contentlogin"&gt; &lt;a href="#page_1" data-role="button"&gt;Navigate to page 1&lt;/a&gt; &lt;!-- Some Form elements are there --&gt; Hello we are on Page 3&lt;br /&gt;Refresh Specific Elements&lt;br /&gt;&lt;br /&gt; &lt;label for="basic"&gt;Text Input 1:&lt;/label&gt; &lt;input type="text" name="name" id="basic" value="" /&gt; &lt;label for="refresh"&gt;Text Input 2 (Refresh):&lt;/label&gt; &lt;input type="text" name="name2" id="refresh" value="" /&gt; &lt;br /&gt; Enter in some values, Navigate to Page 1 and back to Page 3 &lt;/div&gt; &lt;/div&gt; </code></pre>
 

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