title: adding dynamically popup with enhanced content
body: <p>I'm trying to dynamically add a popup to my page, whith nice JQM content (buttons, etc). The popup is added, but no styles applied.</p>
  
  <p>Here's the code (it's not so long, so I copied here):</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /&gt;
      &lt;script src="http://code.jquery.com/jquery-1.8.2.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"&gt;&lt;/script&gt;  &lt;/head&gt;
    &lt;body&gt;
      &lt;div id='page' data-role='page'&gt;
  
        &lt;div data-role='header'&gt;
          &lt;h1&gt; Header &lt;/h1&gt;
        &lt;/div&gt;
  
        &lt;div data-role='content'&gt;
          &lt;p&gt;Code sample&lt;/p&gt;
          &lt;a id='add' data-role='button'&gt; Add popup &lt;/a&gt;
          &lt;a href='#popup' data-role='button' data-rel='popup'&gt; Show dynamic popup &lt;/a&gt;
          &lt;a href='#popup2' data-role='button' data-rel='popup'&gt; Show static popup &lt;/a&gt;
  
        &lt;/div&gt;
        &lt;div id="popup2" data-role='popup'&gt;
          &lt;div data-role="header"&gt; 
            &lt;h1&gt;Popup Header&lt;/h1&gt; 
          &lt;/div&gt;
          &lt;div data-role="content"&gt; 
            &lt;p&gt;Some content&lt;/p&gt; 
          &lt;/div&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
      &lt;script&gt;
        $(document).ready( function(){
          $('#add').bind( 'click', function(ev){
            var
              page = $('#page');
            var 
                popup = $('&lt;div id="popup" data-role="popup"&gt;&lt;/div&gt;').appendTo( page )
              , header = $('&lt;div data-role="header"&gt; &lt;h1&gt;Popup Header&lt;/h1&gt; &lt;/div&gt;').appendTo( popup )
              , content = $('&lt;div data-role="content"&gt; &lt;p&gt;Some content&lt;/p&gt; &lt;/div&gt;').appendTo( popup );
            popup.popup();
          });
        });
      &lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>there's a <a href="http://jsbin.com/orehuv/1/" rel="nofollow">JsBin</a> version, to play around with it.</p>
  
  <p>So if I click to the <strong>Show static popup</strong> it displays the header nicely, but If I click <strong>Add popup</strong>, than show this newly added popup with <strong>Show dynamic popup</strong> the content of the popup looks differently.(using chrome)</p>
  
  <p>So the question is: How can I enchanced the dynamically added popup content?</p>