I have a tampermonkey script that highlights table rows when specific columns contain specific text.
For example the code below successfully highlights rows were column 1 contains 'M' and rows where column 3 contains 'P'.
$("td:nth-of-type(1):contains('M')").parent().css("background-color","#ccccff");
$("td:nth-of-type(3):contains('P')").parent().css("background-color","#ccccff");
How can I use an AND operator or an IF statement to highlight a row only if column 1 contains 'P' AND column 3 contains 'M'?