jquery addclass error
<p>I have a little problem with jQuery:</p>

<pre><code>$('#form-submit').click(function () {

    $('#textarea, #name').removeClass('error-state').addClass('normal-state');

    var myName = $('#name').val();
    var myContent = $('#textarea').val();

    if ( myContent == '' || myName == '')
    {
        $('#textarea, #name').removeClass('normal-state').addClass('error-state');
        return false;
    }

    [more code here]

});   
</code></pre>

<p>This code works good for <code>#textarea</code> but doesn't for <code>#name</code>, I've check and re-recheck without find the error.</p>

<p>But, if we add:</p>

<pre><code>$('#name').val('some value');
</code></pre>

<p>before <code>return false;</code> change the value but the CSS class still the same.</p>

<p>Any ideas?</p>
