jQuery is not a function error
<p>What is wrong with this statement?</p>

<pre><code>message = $("#contact-form").find(".long-text");

if(message.val().length &lt; 15)
{
    message.css("border","2px solid red");
    alert("Your message must be more than 15 character long");
}
</code></pre>

<p>I get message.val is not a function error in <a href="http://en.wikipedia.org/wiki/Firebug_%28Firefox_extension%29" rel="nofollow">Firebug</a>? What could be the reason?</p>

<p><strong>NEW</strong></p>

<p>OK, now my form won't submit if I have more or less than 15 characters. Should I open a new question on this or should I continue on this one?</p>

<p>I have this inside:</p>

<pre><code>$("#contact-form").submit(function(){
  message = $("#contact-form").find(".long-text");

    if(message.val().length &lt; 15)
    {
        message.css("border","2px solid red");
        alert("Your message must be more than 15 character long");
        return false;
    }
    else {
        Post form with Ajax ..
    }
});
</code></pre>
