[jQuery] Re: How do I write a JQuery expression for this?

2008-07-21 Thread Samuel Vogel
We can't really help you with the information you provided. How is the PDF placed in the ? 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

[jQuery] Re: How do I write a JQuery expression for this?

2008-07-21 Thread Karl Swedberg
On Jul 21, 2008, at 1:28 AM, Yehuda Katz wrote: I would strongly recommend against putting a table in a span. Absolutely agree with Yehuda. Fortunately, Dave's second email had sample HTML that used a div rather than a span. --Karl

[jQuery] Re: How do I write a JQuery expression for this?

2008-07-20 Thread Yehuda Katz
I would strongly recommend against putting a table in a span. Karl's solution below is correct. You might also do :contains(.pdf) depending on what sort of text is in your td's. -- Yehuda On Sun, Jul 20, 2008 at 6:38 PM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Within a span with class

[jQuery] Re: How do I write a JQuery expression for this?

2008-07-20 Thread Karl Swedberg
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 HT

[jQuery] Re: How do I write a JQuery expression for this?

2008-07-20 Thread [EMAIL PROTECTED]
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.