Help removing class with checkbox
<p>I am trying to remove a class from a div with a checked checkbox</p>

<p>My Jquery:</p>

<pre><code> &lt;script type="text/javascript"&gt;
// Submit form when checkbox is pressed
  $(function() {
$('.menuitem input:checkbox').change(function(){
    $('form').submit();
    })
// Remove hidediv class from div - DOES NOT WORK
    $('input:submit').hide().addClass("sdasd");
    if($(this).is(":checked")) {
        $('div.hidediv').removeClass("hidediv").show(slow);
    } else {
        $('div.hidediv').addClass("hidediv");
    }
});
});
  &lt;/script&gt;
</code></pre>

<p>My CSS:</p>

<pre><code>.hidediv {display:none;}
</code></pre>

<p>My HTML:</p>

<pre><code>&lt;form accept-charset="UTF-8" action="/" method="get"&gt;&lt;div style="margin:0;padding:0;display:inline"&gt;&lt;input name="utf8" type="hidden" value="&amp;#x2713;" /&gt;&lt;/div&gt;

        &lt;div class="menuitem"&gt;
        &lt;label for="search_company1"&gt;company1&lt;/label&gt;

        &lt;input name="search[company1_is_true]" type="hidden" value="0" /&gt;&lt;input id="search_company1_is_true" name="search[company1_is_true]" type="checkbox" value="1" /&gt;
        &lt;/div&gt;
        &lt;div class="menuitem"&gt;
        &lt;label for="search_company3"&gt;company3&lt;/label&gt;
        &lt;input name="search[company3_is_true]" type="hidden" value="0" /&gt;&lt;input id="search_company3_is_true" name="search[company3_is_true]" type="checkbox" value="1" /&gt;
        &lt;/div&gt;
 &lt;div class="hidediv"&gt;
        &lt;div class="menuitem"&gt;
        &lt;label for="search_company2"&gt;company2&lt;/label&gt;
        &lt;input name="search[company2_is_true]" type="hidden" value="0" /&gt;&lt;input id="search_company2_is_true" name="search[company2_is_true]" type="checkbox" value="1" /&gt;
    &lt;div&gt;
&lt;/div&gt;
    &lt;input id="search_submit" name="commit" style="display:none;" type="submit" value="Submit" /&gt;
&lt;/form&gt;
</code></pre>
