Unable to remove class before applying class again
<p>Just want to remove highlight class before applying class again on other elements. Reseting the selected items. How?</p>

<p>removeClass not working in the below code.</p>

<pre><code>$("#toggleCustom").on("click", function () {
    var $this = $(this),
    $domtree = $this.parents('div.section').find('div.domtree'),
    query = $this.prev().val();
    //$domtree.removeClass('highlight').animate({ marginLeft: 0 }, 'fast');
    $domtree.find(query).addClass('highlight').animate({ marginLeft: 10 }, 'fast');
});
</code></pre>
