title: iFrame jQuery calling jQuery Function in parent
body: <ul>
  <li>How do I get jQuery in an iFrame to call a jQuery function in the parent?</li>
  </ul>
  
  <p><strong>Here is code for iFrame</strong></p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function (){
  
          $("#Hey").click(function ()
          {
  
              parent.WorkPlease(); // does not work
                     window.parent.WorkPlease(); // also does not work
                     // Both hosted on same domain
  
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Here is the jQuery on the parent page hosting the iFrame</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  
      function WorkPlease()
      {
  $('html,body').animate({scrollTop: $("#iFrame").offset().top}, 5000);// 
      }
  });
  &lt;/script&gt;
  </code></pre>