以下のコードを使用して、JqueryFocusOutの実行時にクラスを変更しています
$("#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');
});
そして、ページにロードされたクラス名を使用して検証を行っています。
私の問題はFireBugにありますが、のクラス名が変更されているのがわかりますが、txtNewValues
それでも期待される検証(alphaonly、numbersonly)は実行されません。
ここで何かが足りませんか?