setting display:none to some div after I delete the text from textarea
<p>how to setting display:none to some div after I delete the text from textarea</p>

<p>i have this</p>

<pre><code>$("#par02par04text textarea").keyup(function() {
    $('#par02TextComments.comments').css('display','table-cell');
    $('#par02LabelComments.comments').css('display','table-cell');
});
</code></pre>

<p>which setting display to the some element after I start typing in textarea, i want to invert this when I delete the text from textarea i want to setup display: none</p>

<p>i wrote this</p>

<pre><code>$("#par01par04text textarea").keyup(function() {
    var n = $("td#par01TextComments").length;
    if (n &gt; 0) {
        $('#par01TextComments.comments').css('display','table-cell');
        $('#par01LabelComments.comments').css('display','table-cell');
    }
    else if (n == 0){
        $('#par01TextComments.comments').css('display','none');
        $('#par01LabelComments.comments').css('display','none');
    }
}); 
</code></pre>

<p>but nothing happens </p>
