title: Forcing jQuery Mobile to re-evaluate styles/theme on dynamically inserted content
body: <p><strong>Objective:</strong>   Load HTML content via <code>$.ajax</code>, insert it into the DOM, have jQuery Mobile apply theme styles to it.</p>
  
  <p><strong>Problem:</strong>   Content gets inserted but lacks jQuery Mobile theming.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>$.ajax({
      ...
      success: function(html) {
          $('#container').append(html);
          $('#page').page('refresh', true);
      }
  });
  </code></pre>
  
  <p>The HTML returned includes <code>data-role</code> tags which jQM should style...</p>
  
  <pre><code>&lt;a data-role="button"&gt;Do Something&lt;/a&gt;
  </code></pre>
  
  <p>Instead of applying the styles like it should, I get the following error:</p>
  
  <blockquote>
    <p>uncaught exception: no such method
    'refresh' for page widget instance</p>
  </blockquote>
  
  <hr>
  
  <p>Above code tested using <code>http://code.jquery.com/mobile/latest/jquery.mobile.js</code></p>
  
  <hr>
  
  <p>Similar questions which brought me to the above error message:</p>
  
  <p><a href="https://stackoverflow.com/questions/5157386/consistently-update-page-with-appropriate-jquery-mobile-styles">Consistently update page with appropriate jQuery Mobile styles</a></p>
  
  <p><a href="https://stackoverflow.com/questions/5249250/jqm-jquerymobile-dynamically-added-elements-not-displaying-correctly-and-css-is">JQM (jQueryMobile) Dynamically added elements not displaying correctly and CSS is not applied</a></p>
  
  <p><a href="https://stackoverflow.com/questions/4039428/jquery-mobile-dynamically-creating-form-elements">jQuery Mobile - Dynamically creating form elements</a></p>