Find height of each certain element and set it to it's parent
<p>I'm trying to set height of an <code>li</code> element to its parent's parent <code>div</code>. Every <code>li:first-child</code> has different height based on it's content. What I have so far is:</p>

<p>HTML</p>

<pre><code>&lt;div class="somediv"&gt;
&lt;ul&gt;
&lt;li class="someli"&gt;some content&lt;/li&gt;
&lt;li class="someli"&gt;&lt;/li&gt;
&lt;li class="someli"&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class="somediv"&gt;
&lt;ul&gt;
&lt;li class="someli"&gt;some other content&lt;/li&gt;
&lt;li class="someli"&gt;&lt;/li&gt;
&lt;li class="someli"&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>jQuery</p>

<pre><code>jQuery.each(jQuery('.someli:first-child'), function() {
var height = jQuery(this).height();
alert(height);
jQuery(this).parent().parent().parent().find('.somediv' ).height(height);
});
</code></pre>

<p>Above function alerts height of each <code>li:first-child</code> properly but sets height only of the second <code>li:first-child</code> to all <code>.somediv</code> divs. How to force that function to apply height of each <code>li:first-child</code> only to the parent of that particular <code>li</code>?</p>