My task is to create a table with a column that contains another table, where I want the colors of each alternating row to be different. Please refer to the image below (ignore the "CharacterAgain" column).
Below is an example of AngularJS code for the table: (The list can have any number of elements, even or odd)
<table style="border: 1px solid;">
<thead>
<th>Character</th>
<th>Name</th>
<th>CharacterAgain</th>
</thead>
<tbody>
<tr ng-repeat="actor in AAA.cast">
<td>{{actor.character}}</td>
<td>
<table>
<tr ng-repeat="actor1 in AAA.cast"> // could be some another list
<td>
{{actor.name}}
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
I've attempted various methods to apply a CSS class through scripting, but they all seem to fail in one way or another. I would greatly appreciate it if someone could provide me with a working jsFiddle for this. Please let me know if achieving this is possible using CSS.