title: jquery-mobile create dynamic controlgroup and apply jquery-ui css
body: <p>This is my code:
  <a href="http://jsfiddle.net/YKvR3/34/" rel="noreferrer">http://jsfiddle.net/YKvR3/34/</a></p>
  
  <p>I would create a controlgroup with values that are in my array (name).
  The problem is that when I click load button the values are added in a controlgroup but the jquery-ui styles are not loaded like in the image.
  The controlgroup is not styled with jquery-ui mobile css.</p>
  
  <pre><code>$("#load").click(function(){
  var name=["one","two"];
  var html='&lt;fieldset id="listPlayers" data-role="controlgroup"&gt;&lt;legend&gt;&lt;h1&gt;Choose as many players as youd like to remove:&lt;/h1&gt;&lt;/legend&gt;';
  for ( var int = 0; int &lt; 2; int++) {
          html+='&lt;input type="checkbox" name="checkbox-'+int+'a" id="checkbox-'+int+'a" class="custom" /&gt;&lt;label for="checkbox-'+int+'a"&gt;'+name[int]+'&lt;/label&gt;';
      }
      alert('&lt;legend&gt;&lt;h3&gt;Choose as many players as you would like to remove:&lt;/h3&gt;&lt;/legend&gt;'+html+'&lt;/fieldset');
      $("#list").html(html+'&lt;/fieldset');       
  //$("#list").page();});​
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/zzCf6.png" alt="enter image description here">
  What I am doing wrong?
  Thanks.</p>