title: list appending to last element of collapsible set
body: <p>I am tying to create dynamic collapsible set and to each set I am adding dynamic listview.</p>
  
  <p>Here is how I am doing it:</p>
  
  <pre><code>    function querySuccess(tx, results) {
  
          $.each(results.rows,function(index){ 
             var row = results.rows.item(index);
             var list=$('#List').append('&lt;li&gt;&lt;h3 class="ui-li-heading"&gt;'+'&lt;/h3&gt;&lt;p class="ui-li-"&gt;'+row['data']+'&lt;/p&gt;&lt;/li&gt;');
  
             var div = '&lt;div data-role="collapsible" data-inset="false" data-iconpos="right"&gt;&lt;h3&gt;'+row["data"]+'&lt;/h3&gt;&lt;/div&gt;';
  
             $(list).appendTo(div).parent().appendTo('[data-role="content"]').end().trigger("create");
             $('div[data-role=collapsible]').collapsible({theme:'c',refresh:true});
  
          });         
       } 
  </code></pre>
  
  <p>But the dynamic listview is appending only to last collapsible element and not able to append to others. What is the mistake I am making?</p>