Posts: 44
Location: san francisco, ca
|
I have a simple fictitious table below.
Column 1 contains plain text.
Columns 2 & 3 contain links.
Using jQuery, i'd like to get those TDs in the 1st column for CSS alteration.
I've had success using:
Code:
$("td:contains('Read')").css("font-weight","bold");
But this wont work for that 1st column because i wont know the values of those TDs. What i can do is rely on the requirement that all other TDs will contain HREF
So essentially what i'm stumped on is how to re-syntax it so that i get the 1st columns TDs by telling the page to get all TDs where not contains HREF
Code:
<table id="myTable">
<thead>
<tr>
<th id="col_01">FEATURE</th>
<th id="col_02">REVIEW 1</th>
<th id="col_03">REVIEW 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>FEATURE NAME</td>
<td><a href="#">Read</a></td>
<td><a href="#">Read</a></td>
</tr>
<tr>
<td>FEATURE NAME</td>
<td><a href="#">Read</a></td>
<td><a href="#">Read</a></td>
</tr>
<tr>
<td>FEATURE NAME</td>
<td><a href="#">Read</a></td>
<td><a href="#">Read</a></td>
</tr>
</tbody>
</table>
Any thoughts?
|