Hi Dave,
I'd do it like this:
$('td').filter(function() {
return (/\.pdf\s*$/).test($(this).text())
}).addClass('someclass');
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jul 20, 2008, at 9:23 PM, [EMAIL PROTECTED] wrote:
My bad. Here's the HTML. I would like to write an expression to
apply a class to all the TD's that have ".pdf" as the last part of
their innerHTML.
<div id="domRoot">
<div id="folder0" style="display: block;"></div>
<div id="folder1" style="display: block;"></div>
<div id="folder2" style="display: block;"></div>
<div id="item4" style="display: block;">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tbody>
<tr>
<td background="ftv2vertline.gif"
valign="top"></td>
<td valign="top"></td>
<td width="100%" valign="middle">
<a id="itemTextLink4" class="draggable"
onclick="clickOnLink('4',
'link','_self');return false;" target="_self" href="link" style="-moz-
user-select: none;">cougar.pdf</a>
</td>
Thanks, - Dave
On Jul 20, 7:03 pm, "Samuel Vogel" <[EMAIL PROTECTED]> wrote:
We can't really help you with the information you provided.
How is the PDF placed in the <td>?
You could also just toss an exerpt of your markup at us. That'd be
fine...
Regards,
Samy
2008/7/21 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
Within a span with class "TreeView", there is a table. Within the
table, there are TD's. I want to select the TD's whose content ends
in ".pdf". How would I go about writing an expression to, say,
apply
a class to only those nodes?
Thanks for your help, - Dave- Hide quoted text -
- Show quoted text -