问题
I am using the modified version of the tablesorter jquery add on.
http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm
I need the collapsed rows to take one coloe and not the parent rows color.
Even when i explicitly set the child color, it is still super-ceded by the parent row color.
How do i break that logic
回答1:
You just need to increase the CSS specificity of the child rows. The only issue is that the parent row has a cell that row-spans into the child row, so it won't be styled with the rest of the child row.
Try this css (of course use the color you want); here is a demo:
table.tablesorter .expand-child.odd td,
table.tablesorter .expand-child.even td {
background: #7ff;
}
来源:https://stackoverflow.com/questions/12485065/change-child-row-color-using-jquery-tablesorter