I use bootstrap for on-hover effect for table rows. But I want to remove the hover effect when selecting a table row. I set the class (select-row) using JavaScript when selecting a row. I don't seem to be working for me. I use the not condition in css.
My css:
.table-hover > tbody > tr:not(.select-row):hover > td,
.table-hover > tbody > tr:not(.select-row):hover > th {
background-color: #f5fafe;
color: black;
}
tr.select-row {
background-color: #bddef9;
}
Html:
<table class="table table-condensed table-hover">
<tr>
<td>xxx</td>
<td>xxx</td>
</tr>
</table>
source
share