Note that there are some explanatory texts on larger screens.

plurals
  1. POThe Checkboxradio Widget in Jquery Mobile cannot be rendered when create it dynamically
    text
    copied!<p>HTML code.</p> <pre class="lang-html prettyprint-override"><code>&lt;div data-role="panel" data-theme="b" id="locationPanel" data-position="right" data-dismissible="true" data-display="overlay"&gt; &lt;/div&gt; </code></pre> <p>JS code</p> <pre class="lang-js prettyprint-override"><code>$("#trackSearch").click(function () { if (!loginFlag) { $("#toggleLogin").click(); return false; } $.ajax({ url: '/vehicleAlarm/vehicle/nodeByUser', type: 'get', cache: false, dataType: 'json', success: function (data) { if (data.company) { $("#locationPanel").empty(); var rootStr ="&lt;div data-role='collapsible' id='testcol' data-collapsed='true'&gt;&lt;h3&gt;test&lt;/h3&gt;&lt;div data-role='fieldcontain'&gt; &lt;fieldset data-role='controlgroup'&gt;&lt;input type='checkbox' name='checkbox-1a' id='checkbox-1a' class='custom' /&gt;&lt;label for='checkbox-1a'&gt; Cheetos&lt;/label&gt;&lt;input type='checkbox' name='checkbox-2a' id='checkbox-2a' class='custom' /&gt;&lt;label for='checkbox-2a'&gt; Doritos&lt;/label&gt;&lt;input type='checkbox' name='checkbox-3a' id='checkbox-3a' class='custom' /&gt;&lt;label for='checkbox-3a'&gt; Fritos&lt;/label&gt;&lt;input type='checkbox' name='checkbox-4a' id='checkbox-4a' class='custom' /&gt;&lt;label for='checkbox-4a'&gt; Sun Chips&lt;/label&gt; &lt;/fieldset&gt;&lt;/div&gt;&lt;/div&gt;" $("#locationPanel").append(rootStr); $("#testcol").collapsible(); $("input[type=checkbox]").checkboxradio().checkboxradio('refresh'); $("#locationPanel").panel("open"); $("#testcol" ).on( "collapsibleexpand", function( event, ui ) { console.log("testexpand2"); }); } } }); }); </code></pre> <p>When click the button the panel show and the checkboxradio widget show the original html style cannot be rendered by jqm. Can anyone help me?..thanks </p>
 

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