automatically adjust height to children's height (jQuery)
<p>I have a HTML code like this:</p>

<blockquote>
<pre><code>&lt;pre&gt;&lt;div class="post" style="border-width:1px;border-style:solid"&gt;
 &lt;div class="userpic" style="width:70px;float:left"&gt;
  &lt;img src="XXX"&gt;&lt;br&gt;some text
 &lt;/div&gt;&lt;!-- /userpic --&gt;
 &lt;span class="text"&gt;&lt;h4&gt;I'm a heading&lt;/h4&gt;Just a few words.&lt;/span&gt;
&lt;/div&gt;&lt;!-- /post --&gt; &lt;/pre&gt;
</code></pre>
</blockquote>

<p>Sometimes the picure loaded in the userpic-div is higher than the text in the text-span. The post-div, however, stays as high as the text in it is. Now I want it to be at least as high as the userpic-div. I tried to do that with jQuery, here is what I thought:</p>

<pre><code>$(document).ready(function() {
   var elements = $('.post');
    elements.each(function(){
    userpic = $(this).children('.userpic');

        if($(this).height() &lt; userpic.height()){
        $(this).height() = userpic.height();
            }
    });

 });
</code></pre>

<p>I get no Error (in Chrome) but it doesn't work.</p>

<p>What have I done wrong?</p>
