title: Insert content into iFrame
body: <p>I am trying to insert some content into a 'blank' iFrame, however nothing is being inserted.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;iframe id="iframe"&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$("#iframe").ready(function() {
      var $doc = $("#iframe").contentWindow.document;
      var $body = $("&lt;body&gt;").text("Test");
      $body.insertAfter($doc);
  });
  </code></pre>
  
  <p>I am calling the <code>ready</code> function so I don't understand why it is not inserting.</p>