title: Checking to see if a frame exists with jQuery
body: <p>I have found I can do the following:</p>
  
  <pre><code>if($('#notice', parent.frames['header'].document).length&gt;0) { alert("It is here!"); }
  </code></pre>
  
  <p>to check for an item in another frame.<br>
  Is there a way to find out of the frame exists?  Specifically I am looking to see if parent.frames['header'].document is there.</p>
  
  <p>Is there a reliable way of doing this?</p>
  
  <p>Update:
  Here's my frameset code:</p>
  
  <pre><code>&lt;frameset rows="104,*,22" frameborder="NO" border="0" framespacing="0"&gt;
      &lt;frame src="header.php" id="header" name="header" scrolling="no" title="Header and Menu" noresize&gt;
      &lt;frame src="main.php" title="Main content" name="main"&gt;
      &lt;frame src="footer.php" name="footer" title="Footer" scrolling="NO" noresize&gt;
  &lt;/frameset&gt;
  </code></pre>
  
  <p>I'm trying to make sure that I can access a div that lives inside of "header".
  The downside is that, in some cases, main is replaced with another frameset.</p>