Good day,
Im am trying to get only tr
's with 7 or more td
's on it using a loop.
var table = '<table>';
$('table tr').each(function() {
xx = $(this).children().length;
if(xx>7)
{
table += this;
}
table+='<table>';
console.log(xx);
});
document.getElementById('new_table').innerHTML = table;
but this gives me this result
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
[object HTMLTableRowElement]
could anyone please tell me whats wrong please? Thank You verymuch..