javascript - Apply CSS to TR if certain style is in a TD -
as title says, need addclass()
tr
(the tr
, if multiple) if td
has class.
example:
<table> <tr> <td>test</td> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td class="scratched">test</td> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>test</td> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td class="scratched">test</td> <td>1</td> <td>2</td> <td>3</td> </tr> </table>
so if td has class "scratched", apply class "line" tr.
Comments
Post a Comment