removeClass doesn't work on the second DIV tag
<p>I am learning JQuery and writing a simple data validation for the two fields in
a HTML form:</p>

<pre><code>&lt;FORM name="addpost" id="addpost" method="post" action="/add"&gt;
    &lt;TABLE border=0 width="100%"&gt;
        &lt;TR&gt;
            &lt;TD&gt;Topic&lt;/TD&gt;
            &lt;TD&gt;       
                &lt;DIV id="topic"&gt;
                    &lt;INPUT type=text name="topic" id="topic" size="72" maxlength="108"/&gt;
                &lt;/DIV&gt;       
            &lt;/TD&gt;
        &lt;/TR&gt;
        &lt;TR&gt;
            &lt;TD&gt;Comments&lt;/TD&gt;
            &lt;TD&gt;
                &lt;DIV id="topiccontent"&gt;        
                    &lt;TEXTAREA rows="12" cols="48" name="content" id="content"&gt;
                    &lt;/TEXTAREA&gt;
                &lt;/DIV&gt;
            &lt;/TD&gt;
        &lt;/TR&gt;
        &lt;TR&gt;
            &lt;TD&gt;
                &lt;INPUT type="submit" value="Send"&gt;
            &lt;/TD&gt;
        &lt;/TR&gt;
    &lt;/TABLE&gt;
&lt;/FORM&gt;
</code></pre>

<p>Here is the JQuery script for checking the data input from the form above:</p>

<pre><code>$('#addpost').submit(function(){       
    if($('#topic').val()==""){
        $('#topic').addClass('hierror'); 
        return false;}
    else{$('#topic').removeClass('hierror');}

    if($('#topiccontent').val()==""){
        $('#topiccontent').addClass('hierror'); 
        return false;}
    else{$('#topiccontent').removeClass('hierror');}
});
</code></pre>

<p>Here is the CSS for the hierror class:</p>

<pre><code>.hierror{border-style:solid; border-width:12px; border-color:#FF0000;}
</code></pre>

<p>The problem is that <code>('#topic').removeClass('hierror')</code> works but <code>('#topiccontent').removeClass('hierror')</code> doesn't.</p>

<p>Could you help me please?</p>
