Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Correct me if I'm wrong, as far as I could tell when reading your codes, there could be multiple issues</p> <p>First of all, the reference of <strong>g_html</strong> variable, why don't you return the html in function <strong>lochtml</strong> and in your for loop, build up the HTML like this, it's more readable</p> <pre><code> for (var i=0;i&lt;res.length;i++){ g_html=g_html+lochtml('loc',i,r...) } </code></pre> <p>Second, the initial value of <strong>g_html</strong> is being set to <strong>res[0].brand</strong>, what is it value?</p> <p>Third, this is what's being generated for the collapsible-set div:</p> <pre><code> the res[0].brand above &lt;div data-role="collapsible-set" data-theme="f"&gt; &lt;div class='locgoh'&gt; &lt;a ...&gt; &lt;img /&gt; &lt;/a&gt; &lt;/div&gt; &lt;div data-role="collapsible" class="loccollapse" data-theme="f" div="coldiv"&gt; &lt;h3&gt;...&lt;/h3&gt; &lt;p&gt;...&lt;/p&gt; &lt;div class="clearfloat"&gt;&lt;/div&gt; &lt;/div&gt; ... ... &lt;/div&gt; </code></pre> <p>This was not what jQuery Mobile expect of content of a data-role="collapsible-set" I supposed, there should be only <strong>&lt;div data-role="collapsible"&gt;</strong> inside a <strong>&lt;div data-role="collapsible-set"&gt;</strong>. I suggest that you move the <strong>&lt;div class='locgoh'&gt;</strong> inside <strong>&lt;h3&gt;</strong></p> <p>Forth, is there a need for <strong>&lt;div class="clearfloat"&gt;</strong>? did you float tag <strong>p</strong> inside the collapsible? I had some issue when I used "float" with some jQM widgets before. Besides, if clearfloat doesn't need to be there, it's better to be removed.</p> <p>Lastly, I think the <strong>collapsibleset('refresh')</strong> should be <em>called</em> on the <strong>&lt;div data-role="collapsible-set"&gt;</strong> not on its container.</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