jquery - Odd or even color for rowspan tablerow -
odd/even styles set on table each td-element don't work because of row span. seek on http://jsfiddle.net/efp7f/61/
css style:
.tablerow1 td { background-color:#ffffff; } .tablerow2 td { background-color:green; }
html code:
<table border="1"> <tr> <th>type</th> <th>description</th> <th>number</th> </tr> <tr class="tablerow1"> <td rowspan="1"><p>cash</p></td> <td><p>cash</p></td> <td><p>00000</p></td> </tr> <tr class="tablerow2"> <td rowspan="2"><p>receivables</p></td> <td><p>receivable</p></td> <td><p>00</p></td> </tr> <tr> <td><p>accounts</p></td> <td><p>0</p></td> </tr> </table>
how can solve this?
you can utilize css apply color alternatively.
.tablerow1 td:nth-child(even) { background-color:#ffffff; } .tablerow2 td:nth-child(odd) { background-color:green; }
jquery html css
No comments:
Post a Comment