Am using the below code to change the class at runtime in Jquery FocusOut
$("#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');
});
And am having validation using the class names loaded in the page.
My issue is in FireBug I see the Class name has changed for the txtNewValues
, But still the expected validations(alphaonly,numbersonly) are not fired.
Am I missing something here?