Check is textarea empty (treating only 'enter' like empty)?
<p>Welcome,</p>

<p>I have textarea and i have small function what allow me to submit message on enter keypress.</p>

<pre><code>$(function(){
    $('input').keydown(function(e){
        if (e.keyCode == 13) {

          $(".sender").click();
            return false;
        }
    });
});
</code></pre>

<p>That's work fine, i mean great :)</p>

<p>Next, i want disallow sending empty form.
So i was thinking it will be a easy task.</p>

<pre><code>var tag = $("#mytextarea").val();

if(tag.length&lt;1 )
{
//empty
}
else
{
//not empty
}
</code></pre>

<p>But it's not working. I also try val=='' 
I think it count that enter what user hit to send form ;)
I was trying alert value, but i got only that enter...</p>

<p>So, how can i check if is empty or not, but counting enter, like empty.
If only enter will be found, threat like empty space val=='' </p>

<p>Regards</p>
