If you have the ability to change the output of the shopping cart, you could add a class to the <tr>
tag, e.g. <tr class="row01">
, <tr class="row02">
, etc.
If you can't change your back-end, then it's a choice of front-end tech. The most cross-browser method is to use jQuery to apply the row classes. The other alternative, CSS3, isn't supported by any current IE; given that this is a shopping cart, you're probably interested in the widest level of browser support.
Something like:
$('#shopping-cart-totals-table tr').each(function(n){
$(this).addClass('row'+n);
});
Alternatively, if you're only interested in the third item, use jQuery in the same way as CSS3:
$('#shopping-cart-totals-table tr:nth-child(2) .price').addClass('highlightClass');