私はいくつかのテーブルを持っており、このテーブルにはいくつかのコンテンツのみを保持する必要があるため、これを持っています
$(truc).find('tr').each(function(lig) {
if (lig != 0 && (!$(this).children(':first').not('')) && (!$(this).children(':first').hasClass('main-title')) && (!$(this).children(':first').hasClass('top-top-title'))) {
$(this).remove();
}
;
}
(!$(this).children(':first').not(''))
最初の子にクラスがなく(空のクラスでさえない)行を選択する必要があり、必要な指示がわからないため、ヘルプが必要です
編集:$(this).children(':first')
属性 class があるかどうかを
チェックするように自分で解決した$(this).children(':first').attr('class')
ので、要素にクラスがない場合は、 if に入りません