Jquery Add Remove class
<p>Am using the below code to change the class at runtime in Jquery FocusOut</p>

<pre><code>$("#txtNewAttributes").focusout(function () {
        var attributeTextBox = $("#txtNewAttributes").val()
        if ($.trim(attributeTextBox) == "Height")
            $(txtNewValues).removeClass('alphaonly').addClass('numbersonly');
        if ($.trim(attributeTextBox) == "string" || $.trim(attributeTextBox) == "string2")
            $(txtNewValues).removeClass('numbersonly').addClass('alphaonly');
    });
</code></pre>

<p>And am having validation using the class names loaded in the page.</p>

<p>My issue is in FireBug i see the Class name has changed for the <strong>txtNewValues</strong> , But still the expected validations(alphaonly,numbersonly) are not fired.</p>

<p>Am i missing something here? </p>
