How to find the previous element height using jquery
<p>I have a table which is defined like:</p>

<pre><code>&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;First&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type='text' style='widht:200px; height:100px;' /&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;button class='but'&gt;&lt;/button&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;Second&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;select style='widht:100px; height:150px;'&gt;
                &lt;option&gt;one&lt;/one&gt;
            &lt;/select&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;button class='but'&gt;&lt;/button&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;input type='text' style='widht:200px; height:100px;' /&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;button class='but'&gt;&lt;/button&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;label&gt;Third&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;textarea style='widht:500px; height:200px;'&gt;&lt;/textarea&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;button class='but'&gt;&lt;/button&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>Then on button click I want to get the height of the previous control. So I wrote this code:</p>

<pre><code> $(".but").live('click',function(){
     alert($(this).prev().css('width'));
     alert($(this).prev().css('height'));
 });
</code></pre>

<p>But the alert's are showing the values as undefined. How can I solve this?</p>
