I’ve been trying to figure out how to do this. For some reason when I use the “.yellow” selector, it returns an object, but I cannot get to the parent of the object, keeps saying everything about it is null.
I have this cell:
<td aria-describedby="CommodityControlReportGrid_ApprovalType" style="text-align:left;" role="gridcell">
<span class="yellow"></span>
Ignored
</td>
The parent row of these different cells all have the following schema:
<tr class="ui-widget-content jqgrow ui-row-ltr" tabindex="-1" id="101023" role="row"></tr>
Basically, I want to apply a background color of the row based on the rows that contain the cell with a <span class="yellow"></span>.
How would I do this in Jquery, or at least select the row I want (I know how to apply the color)?
You can just select by the span with class yellow – gets them all.. then apply to the corresponding tr
http://jsfiddle.net/jtY7Q/