Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Mobile Dialogs content not changing
    primarykey
    data
    text
    <p>I have a list of receipts and a dialog that opens up with details when the receipts are clicked:</p> <pre><code>function showReceipt( urlObj, options, receiptNumber) { var pageSelector = urlObj.hash.replace( /\?.*$/, ""), $page = $( pageSelector), $header = $page.children( ":jqmData(role=header)" ), $content = $page.children( ":jqmData(role=content)" ), markup=''; markup += buildReceipt( receiptNumber, markup ); $header.find( "h1").html( receiptNumber); $content.html( markup ); $page.page(); $content.find( ":jqmData(role=listview)" ).listview(); options.dataUrl = urlObj.href; } </code></pre> <p>html file</p> <pre><code>&lt;div id="receipt" data-role="dialog"&gt; &lt;div data-role="header"&gt;&lt;h1&gt;&lt;/h1&gt;&lt;/div&gt; &lt;div data-role="content"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>It works fine when i click on the first receipt, but once i close the dialog and click on another receipt, the details of the first receipt pop up. I've tried various things like:</p> <pre><code>$("#receipt").on("pagehide", function() { $("#receipt").jqmRemoveData(':jqmData(role=content)'); }); </code></pre> <p>or </p> <pre><code>$("#receipt").on("pagehide", function() { $("#receipt").empty(); }); </code></pre> <p>and even </p> <pre><code>$("#receipt").on("pagehide", function() { $("#receipt").remove(); }); </code></pre> <p>but none seem to work. I've tested to see if he variables like receipt number are correct when calling and there's no problem, the correct variables are being passed.</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