title: Set iframe innerHTML without loading page in it (with jquery)
body: <p>I want to set the contents of an iframe dynamically, when no pages were loaded before in the iframe.</p>
  
  <p>I'm doing that :</p>
  
  <pre><code>iframe = $('&lt;iframe id="thepage"&gt;&lt;/iframe&gt;');
  
  iframeHtml = 'iframeHtml';
  $('body').append(iframe);
  
  iframe
  .contents()
  .html(iframeHtml);
  </code></pre>
  
  <p>But it is not working, the html is still empty.</p>