How to select <tr> that has <td>'s only, but not <th> using jQuery? -
i have table headers , table data. this:
<table> <tr> <th>start time</th><th>end time</th> </tr> <tr> <td>12:00 am</td><td>01:00 am</td> </tr> <tr> <td>01:00 am</td><td>02:00 am</td> </tr> <tr> <td>12:00 pm</td><td>01:00 am</td> </tr> </table> now want select data rows only. header row should not selected. don't want add class td or tr elements
i have in jquery, jquery specific solution acceptable too.
any clue.
you can use :has selector tr have td elements in it:
$('tr:has(td)').css('name','value')
Comments
Post a Comment