title: JQM (jQueryMobile) Dynamically added elements not displaying correctly and CSS is not applied
body: <p>I'm having an issue with adding a select tag dynamically, the CSS and additional html tags (that JQM add) are is not being applied.</p>
  
  <p>Here is an example of how I'm adding the new select tag: <a href="http://jsfiddle.net/UcrD8/4/" rel="nofollow">http://jsfiddle.net/UcrD8/4/</a></p>
  
  <p>The HTML:</p>
  
  <pre><code>&lt;div data-role="page" id="page_1"&gt;
      &lt;div id="select_option_groups"&gt;
          &lt;div data-role="fieldcontain"&gt;
              &lt;select name="select_options_1"&gt;
                  &lt;option value="" selected&gt;Please select an option&lt;/option&gt;
                  &lt;option value="foo"&gt;Foo&lt;/option&gt;
                  &lt;option value="bar"&gt;Bar&lt;/option&gt;
              &lt;/select&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The JS:</p>
  
  <pre><code>$(function(){
      var counter = 2;
      var onChange = function(e){
          val = $(':selected',this).val() || '';
          if (val != ''){
              // they may be able to toggle between valid options, too.
              // let's avoid that using a class we can apply
              var c = 'alreadyMadeASelection';
              if ($(this).hasClass(c))
                  return;
              // now take the current select and clone it, then rename it
              var newSelect = $(this)
                  .clone()
                  .attr('name','select_options_'+counter)
                  .attr('id','select_options_'+counter)
                  .appendTo('#select_option_groups')
                  .change(onChange);
              $(this).addClass(c);
              counter++;
          } else {
              var id = $(this).attr('name').match(/\d+$/), parent = $(this).parent();
              $(this).remove();
  
              // re-order the counter (we don't want missing numbers in the middle)
              $('select',parent).each(function(){
                  var iid = $(this).attr('name').match(/\d+$/);
                  if (iid&gt;id)
                      $(this).attr('name','select_options_'+(iid-1));
              });
              counter--;
          }
      };
      $('#select_option_groups select').change(onChange);
  });
  </code></pre>
  
  <p>I've tried:</p>
  
  <pre><code>// this gets the select tags to stack but still no CSS
  $(newSelect).fieldcontain('refresh'); 
  
  // does nothing
  $(newSelect).page();
  
  // does nothing
  $('#page_1').page();
  </code></pre>