title: Access component from iframe source in jquery?
body: <p>I have the feeling this is something simple that I am missing, but I haven't been able to find a solution to this so far. I'm somewhat of a web noob so I apologize if this was answered somewhere already and I missed it.</p>
  
  <p>Below is a sample of what I'm attempting to do. I have input (button_hide) and div (box) components in "example.php" which is the source of the iframe that I would like to access and to perform jquery functions on.</p>
  
  <p>I saw somewhere that contents is the way to access it from the iframe but this doesn't seem to be working. </p>
  
  <p>Any help is greatly appreciated!</p>
  
  <pre><code>&lt;iframe id="iframe" height="450" width="100%" frameBorder="0" src="example.php" /&gt;
  &lt;script&gt;
  $(document).ready(function(){
  
    $('#iframe').contents().find('#box').slideUp();
    var hideButton = $('#iframe').contents().find('#button_hide');
  
    hideButton.click(function(){
      alert('Hi');  
    });
  
  });
  &lt;/script&gt;
  </code></pre>