jquery problem with simple code
<p>why this code is not working</p>

<pre><code>    var name = $("#name").val();    
    var email = $("#email").val();
    var web = $("#web").val();
    var comment = $("#comment").val();


    if(name.length &lt; 5){
        $("#name").css("border-color","red");
    } elseif (email.length &lt; 5) {
        $("#email").css("border-color","red");
    } elseif (web.length &lt; 5) {
        $("#web").css("border-color","red");
    } elseif (comment.length &lt; 10) {
        $("#comment").css("border-color","red");         
    }else{

alert('ok');

}
</code></pre>

<p>and each val for one like this <code>&lt;input id="name" type="text"  size="24" /&gt;</code></p>
