setting the height of the parent according to the highest child element, jquery
<p>I have a layout, which basically contains a</p>

<pre><code>&lt;div class="line" id="#"&gt;
&lt;div class="summary"&gt;
Some Text
&lt;/div&gt;
&lt;div class="summary"&gt;
Some
&lt;/div&gt;
&lt;div class="summary"&gt;
Some long text
&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I want, using jQuery, to expand the height of the <code>&lt;div class="line"&gt;</code> according to the highest child element, I tried fiddling with:</p>

<pre><code>$(".line").attr("id", function()
while ($(this).next().length &gt; 0)
{
ac = $(this).children(".summary").outerHeight();
a = $(this).children(".summary").next().outerHeight();

if (a &gt; ac)
{
a = ac;
}
}
$(this).css("height", a + "px");
});
</code></pre>

<p>and no success, what selectors I need to use, and how would I go about achieving this?</p>
