i am tryng to get all the td from each row in which colspan attribute is not defined
$('tr').each(function () {
$(this).find('td').each(function () {
if (($(this).text().trim() == "")) && // and this td not has colspan attribute {
$(this).closest("td").remove();
};
});
});
As per OP comment, he want to remove the
tdwithno colspanandemptyvalue. i guess this can be done that in one line. try thisfiddle : http://jsfiddle.net/F92De/1/