I think my scripting is pretty close, but I cannot seem to return anything.
I have two columns in a table, I would like to find a string in one, and then read down the row to find the contents of another.
I’ve given both of the columns individual class names, here is my script:
if ($("td.cellONE:contains('STRING')")) {
var OutputCell = $(this).parents("tr").find(".cellONEa");
console.log($(this).text());
console.log(OutputCell.text());
}
else {console.log("no");}
});
thisin your code refers towindowobject, you can useeachmethod.