[jQuery] Re: select td 2 levels up

2007-06-07 Thread JoshN
al Message - > From: Ⓙⓐⓚⓔ > To: jquery-en@googlegroups.com > Sent: Thursday, June 07, 2007 11:39 AM > Subject: [jQuery] Re: select td 2 levels up > > did you try .parents("td:eq(1)") > > On 6/7/07, Josh Nathanson <[EMAIL PROTECTED]> wrote: >

[jQuery] Re: select td 2 levels up

2007-06-07 Thread Josh Nathanson
> did you try .parents("td:eq(1)") That works. Thanks! Much prettier. -- Josh - Original Message - From: Ⓙⓐⓚⓔ To: jquery-en@googlegroups.com Sent: Thursday, June 07, 2007 11:39 AM Subject: [jQuery] Re: select td 2 levels up did you try .parents("td:

[jQuery] Re: select td 2 levels up

2007-06-07 Thread Ⓙⓐⓚⓔ
ust couldn't get it looking the way I want in IE6. Oh well, ugly it is! - Original Message - *From:* Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> *To:* jquery-en@googlegroups.com *Sent:* Thursday, June 07, 2007 11:09 AM *Subject:* [jQuery] Re: select td 2 levels up oops Matt. if this is th

[jQuery] Re: select td 2 levels up

2007-06-07 Thread Josh Nathanson
- From: Ⓙⓐⓚⓔ To: jquery-en@googlegroups.com Sent: Thursday, June 07, 2007 11:09 AM Subject: [jQuery] Re: select td 2 levels up oops Matt. if this is the in Ha Ha yours breaks

[jQuery] Re: select td 2 levels up

2007-06-07 Thread Ⓙⓐⓚⓔ
oops Matt. if this is the in Ha Ha yours breaks

[jQuery] Re: select td 2 levels up

2007-06-07 Thread Ⓙⓐⓚⓔ
Matt, you're assuming this is simple! if this is Ha Ha yours breaks Josh, tables are ugly, accessing them is ugly too! If you have one or two lines like that it's ok to be ugly. $.fn.grandTD = function(){return this.parents("td:first").parents("td:first")} might make get a bit shorter On

[jQuery] Re: select td 2 levels up

2007-06-07 Thread Matt Stith
You could just do $(this).parent().parent().addClass("greenback"); That should work fine. On 6/7/07, Josh Nathanson <[EMAIL PROTECTED]> wrote: I am trying to select the first td element two levels up from the clicked div element. I have this, which works, but it's ugly. $(this).parents("td