I have some a table and I need to keep only few contents in this table, so I have this
$(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();
}
;
}
I need help for the (!$(this).children(':first').not(''))
because I need to select the line where the first child has no class(not even an empty class) and I don't know which instructions I need
Edit : I resolved myself witch a check on $(this).children(':first')
if they have an attribute class
$(this).children(':first').attr('class')
, so if an element has no class, it doesn't enter in the if