I'm trying to compare the value of a column of a table
, so depending on what is selected, show or hide the field, I got in this code:
td = tr[i].getElementsByTagName("td")[3];
console.log(td);
debugger;
if (td == $('#Produtos').prop("checked",true)) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
But it is not filtering, how to correct?
no console.log(td)
is appearing <td>True</td>
according to each line, am I getting the value wrong?