最も近い要素から特定のクラスの一致を見つけようとしています
$(this).closest("tr");
この tr がクラス名 testlog3 を持っているかどうかを調べる必要があります。
最も近い要素から特定のクラスの一致を見つけようとしています
$(this).closest("tr");
この tr がクラス名 testlog3 を持っているかどうかを調べる必要があります。
次のように最も近い関数を使用できます。
$(this).closest('tr.testlog3');
使用hasClass
:
if($(this).closest('tr').hasClass('testlog3')) {
// ...