I'm using the DataTables library to build tables. I use Bootstrap to style those tables. One of the features of DataTables is an API to expand details / add a child row. (See https://datatables.net/examples/api/row_details.html) It does this by inserting a new tr under the current row. The problem is this interferes with the Bootstrap selector to apply row shading:
.table-striped > tbody > tr:nth-child(odd) > td,
.table-striped > tbody > tr:nth-child(odd) > th {
background-color: #f9f9f9;
}
The selector now selects the new "details" row in it's odd/even selector. I don't want this.
Any thoughts on how to how to write a selector to skip these details rows?
e.g.unexpanded
<tr role="row" class="odd">...</tr>
And then when I expand / show details:
<tr role="row" class="odd shown">...</tr>
<tr>...</tr>