I have to loop through table in every tr if td have csstdgreen and have attribute rowspan. I have to remove cell have text Remove Me.
function clearTable()
$('table tr').each(function(){
var indexofThis,indexofColSpan,numRows;
if($('td[rowspan]',this).length!=0)
{
indexofThis =$('table tr').index(this);
indexofColSpan = $('td',this).index($('td[rowspan]',this));
numRows = $('td[rowspan]',this).attr('rowspan');
$('table tr:gt('+indexofThis+')').each(function(){
$('td:eq('+indexofColSpan+')',this).remove();
});
}
});
this should give you a helping hand to get what you need. JS fiddle is not working for me atm. there is a little tinkering to do as it does not do the number of rows, so it will do the whole grid. but this is the main part done.