iframes: accessing parent from a child element inside a iframe
<p>I have an Iframe inside of a page that has the src set to a file on the same local machine (not cross domain).</p>

<p>So I have a page that looks like this:</p>

<pre><code>&lt;html&gt;
 &lt;head/&gt;
 &lt;body&gt;&lt;iframe id="something" src="somepage.html"/&gt;&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Inside of the iframe there is some contents</p>

<pre><code>    &lt;html&gt;
    &lt;head/&gt;
     &lt;body&gt;
      &lt;li&gt;
        &lt;ul&gt;stuff&lt;/ul&gt;
      &lt;/li&gt;
     &lt;/body&gt;
    &lt;/html&gt;
</code></pre>

<p>My question is, I have a variable (in my index page) that is currently pointing to the element <code>var element = &lt;ul&gt;stuff&lt;/ul&gt;</code> which is inside of the iframe.</p>

<p>From this variable I want to be able to access the parent iframe and get the id 'something'.</p>

<p>I have been attempting some jquery using find with no luck</p>

<pre><code>$(element).find('iframe')
</code></pre>

<p>And I am wondering where I am going wrong... I have googled other solutions but they are all related to being outside of the iframe looking in, I guess I am inside looking out! is there anyone else out there that could help shed some light?</p>
