title: JQuery Mobile not applied
body: <p>I'm having some troubles with JQueryMobile because i want to implement some widgets but the themes and color of the widgets is not well-implemented.</p>
  
  <p>Here's a photo to show what's happening:
  <img src="https://i.stack.imgur.com/rdBVO.png" alt="enter image description here"></p>
  
  <p>And the correct widget for example would be that:</p>
  
  <p><img src="https://i.stack.imgur.com/MTPSO.png" alt="enter image description here"></p>
  
  <p>If i add the jquerymobile widgets dynamically then the theme is not well-added but if the html is already on a file (not added dynamically with javascript) the theme looks well. Here's the code I use to add the widgets:</p>
  
  <pre><code>function cesta_insert_html(){
      var cesta_bought = $('body').data('cesta_list');
      cesta_bought.forEach(function(element, index){
          image = get_product_info(element[0].id, 'data' + $('body').data('clicked_listview_item'));
          $('#cesta_view').append('&lt;div data-role="collapsible-set" id="collapsible" data-theme="a" data-content-theme="c"&gt;&lt;div data-role="collapsible" data-collapsed="false"&gt;&lt;h3 id="title_collapsible"&gt;'+image.pname+'&lt;/h3&gt;&lt;center&gt;&lt;div id=image_cesta&gt;&lt;img src=data:imajpeg;base64,'+image.pimage+' alt="image"&gt;&lt;/div&gt;&lt;div data-role="fieldcontain"&gt;&lt;fieldset data-role="controlgroup"&gt;&lt;input type="range" class="slider" name="slider" value="0" min="0" max="100" data-highlight="false"&gt;&lt;/fieldset&gt;&lt;/div&gt;&lt;/center&gt;&lt;div class="ui-grid-a"&gt;&lt;div class="ui-block-a"&gt;&lt;a id=SaveChangesCesta data-role="button" type="submit" &gt;Guardar cambios&lt;/a&gt;&lt;/div&gt;&lt;div class="ui-block-b"&gt;&lt;a id="DeleteCesta" type="submit" &gt;Eliminar de cesta&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;&lt;br&gt;');
      });
  }
  </code></pre>
  
  <p>Thanks!</p>