Reply
jQuery, how to get TD's where not contains HREF attribute
Old 10-07-2009, 07:27 PM jQuery, how to get TD's where not contains HREF attribute
seannarae's Avatar
Experienced Talker

Posts: 44
Location: san francisco, ca
Trades: 0
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?
seannarae is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Reply     « Reply to jQuery, how to get TD's where not contains HREF attribute
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 



Page generated in 0.13196 seconds with 13 queries