title: jquery append content from iframe
body: <p>I would like to transfer some content from (div class="StaffBlock") that loaded from the iframe from /index.html into div class="Contact-Agent-Append". but my jquery is not working and i dont know why, is it because of im loading it from iframe? Thanks.</p>
  
  <pre><code>&lt;iframe scrolling="no" height="60px" frameborder="0" width="150px" src="/index.html" marginwidth="0px" marginheight="0px" style="overflow:hidden; margin:0; padding:0; display: none;"&gt;&lt;/iframe&gt;
  
  &lt;script&gt;
  $('.StaffBlock').appendTo($('.Contact-Agent-Append'));
  &lt;/script&gt; 
  
  &lt;div class="Contact-Agent-Append"&gt;content should go here
  &lt;/div&gt;
  </code></pre>
  
  <h2><strong>Question Updated:</strong></h2>
  
  <p><strong>this is the content stored in the remote url which contain the StaffBlock:</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;link rel="stylesheet" type="text/css" href="/StyleSheets/listing-contact.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div class="listing-contact"&gt;
  &lt;div class="StaffBlock"&gt;
  &lt;table border="0" cellpadding="0" cellspacing="0"&gt;
    &lt;tr&gt;
      &lt;td class="col-a"&gt;{tag_name}&lt;/td&gt;
      &lt;td class="col-b" rowspan="4"&gt;{tag_Staff Photo}&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;{tag_job title}&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;{tag_mobile}&lt;/td&gt;
      &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;a href="mailto:{tag_email}"&gt;email me&lt;/a&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>and this is the original coding that contain the iframe:</strong></p>
  
  <pre><code>&lt;div class="Contact-Agent-{tag_Publish As Agent}"&gt;
  
      &lt;div class="Contact-Agent-Small-Logo-listing" title="this property is published by agent"&gt;
      &lt;/div&gt;
      &lt;iframe scrolling="no" height="60px" frameborder="0" width="150px" src="{tag_listing agent staff url}" marginwidth="0px" marginheight="0px" style="overflow:hidden; margin:0; padding:0; display: none;"&gt;&lt;/iframe&gt;
      &lt;script type='text/javascript'&gt;//&lt;![CDATA[ 
      $(window).load(function(){
      $('iframe').contents().find('.StaffBlock').clone().appendTo($('.Contact-Agent-Append'))‌​‌​
  });//]]&gt;  
      &lt;/script&gt; 
      &lt;div class="Contact-Agent-Append"&gt;1
      &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>