Please help me put the cells with a class that corresponds to the column header, in the appropriate column. The iteration should be done per column and then loop through the
Here's how I would go about it. $(this).attr('class')
will get the class of the current item in $tempScanner, and $(this).text()
will get the contents.
var $tempScanner = $('table.temp tr td');
$tempScanner.each(function() {
// Select the first empty cell in #tblGrid that has the same class as the current
// $tempScanner item and give it the same content. Then remove the original table.
$("table#tblGrid tr td."+$(this).attr('class')+":empty:first").html($(this).text());
});
$tempScanner.remove();