<tr>
<td class="cat" CategoryId="8">NoChange*: </td>
<td><span class="itm" CategoryId="8">A</span></td>
</tr>
<tr>
<td class="cat" CategoryId="9">Row should be red*: </td>
<td></td>
</tr>
<tr>
<td class="cat">Comments:</td>
<td><span class="itm"></span></td>
</tr>
I want to set Validation for Category which does not have items in it. For category 8 it has one value associated hence there is no need to show required where as 9 does not have any item associated with it.hence its tr color should be set to red. Also comment should be ignored altogether as it is not having any categoryid as such. I m trying to set it as
$("tr.cat~tr.itm").children(":not(:has(td))").css("color","red")