I have a table looks like this (below) after using css nth-child(2n).
tr:nth-child(2n) {background-color: #f0f3f5;}
After doing some hidden on the vID,ID,MO_Sub tr
<tr style="display:none">
The table now looks like this below, with backgroung on "MO" and "MODEL".
I have done somthing like (below) and it doesn't seem to work.
tr:not(.isotope-hidden):nth-child(2n)
Anyone got any idea applying css after the hidden tr? Thanks for any helps! =)
EDIT: add snippet
tr:not([style*="display:none"]):nth-child(2n){
background-color: #f0f3f5;
}
tr:hover{
background-color: cadetblue;
}
<table id="form_tb">
<tr style="display:none">
<td><label>vvID :</label></td>
<td><input type="text" name="vvID" placeholder="vvID" readonly></td>
</tr>
<tr style="display:none">
<td><label>vID :</label></td>
<td><input type="text" name="vID" placeholder="vID" readonly></td>
</tr>
<tr style="display:none">
<td><label>vID_sub :</label></td>
<td><input type="text" name="vID_sub" placeholder="vID_sub" readonly></td>
</tr>
<tr style="display:none">
<td><label>ST :</label></td>
<td><input type="text" name="Station" placeholder="Station" readonly></td>
</tr>
<tr style="display:none">
<td><label>SortID :</label></td>
<td><input type="text" name="SortID" placeholder="SortID" readonly></td>
</tr>
<tr>
<td><label>MO :</label></td>
<td data-key='MO'><input id=MO type="text" name="MO" placeholder="MO" readonly></td>
</tr>
<tr style="display:none">
<td><label>MO_Sub :</label></td>
<td><input type="text" name="MO_Sub" placeholder="MO_Sub" readonly></td>
</tr>
<tr>
<td><label>PART :</label></td>
<td data-key='text'><input type="text" name="Part_number" placeholder="PART" readonly></td>
</tr>
<tr>
<td><label>MODEL :</label></td>
<td><input type="text" name="Model" placeholder="MODEL" readonly></td>
</tr>
<tr style="display:none">
<td><label>Class :</label></td>
<td><input type="text" name="Product_Class" placeholder="Class" readonly></td>
</tr>
<tr>
<td><label>Side :</label></td>
<td><input type="text" name="Side" placeholder="Side" readonly></td>
</tr>
</table>
Result for the snippet should look like this.(below)