[jQuery] How to get the ID of the parent node?

2007-02-21 Thread dalvarado
Hi, Following up from a question I asked yesterday, I wanted to get the closest parent DIV given an arbitrary nested element. But when I request the .id of that element, i repeatedly get an undefined message, even though this call, $(this).parent(div.sidebarToDo) yields an object.

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Sam Collett
On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Following up from a question I asked yesterday, I wanted to get the closest parent DIV given an arbitrary nested element. But when I request the .id of that element, i repeatedly get an undefined message, even though this call,

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Chris Ovenden
On 2/21/07, Sam Collett [EMAIL PROTECTED] wrote: On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, Following up from a question I asked yesterday, I wanted to get the closest parent DIV given an arbitrary nested element. But when I request the .id of that element, i repeatedly get

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread dalvarado
---Original Message--- From: Chris Ovenden [EMAIL PROTECTED] Subject: Re: [jQuery] How to get the ID of the parent node? Sent: Feb 21 '07 16:04 On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On 21/02/07, [LINK: mailto:[EMAIL PROTECTED]

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Sam Collett
On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ---Original Message--- From: Chris Ovenden [EMAIL PROTECTED] Subject: Re: [jQuery] How to get the ID of the parent node? Sent: Feb 21 '07 16:04 On 2/21/07, SAM COLLETT [LINK: mailto:[EMAIL PROTECTED] [EMAIL

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Karl Swedberg
Hi Dave, A couple things: 1. since you're trying to get the ID of an ancestor of a class=deleteTDItem, you need to add an s to parent. This should work: $('#todoList a.deleteTDItem').each(function(index) { var divId = $(this).parents(div.sidebarToDo).attr(id);

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread Sam Collett
On 21/02/07, Sam Collett [EMAIL PROTECTED] wrote: On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ---Original Message--- From: Chris Ovenden [EMAIL PROTECTED] Subject: Re: [jQuery] How to get the ID of the parent node? Sent: Feb 21 '07 16:04 On 2/21/07,

Re: [jQuery] How to get the ID of the parent node?

2007-02-21 Thread dalvarado
---Original Message--- From: Sam Collett [EMAIL PROTECTED] Subject: Re: [jQuery] How to get the ID of the parent node? Sent: Feb 21 '07 17:19 On 21/02/07, Sam Collett [EMAIL PROTECTED] wrote: On 21/02/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: ---Original