Re: [jQuery] Selector question

2007-03-28 Thread Kush Murod
Sorry I meant this ones $('td').children().is('[EMAIL PROTECTED]') works OK $('td').children('[EMAIL PROTECTED]') Doesn't work -- Kush Murod wrote: Hi guys, This works ok $('td').children().is('img :[EMAIL PROTECTED]') Having said that I assumed I could also achieve same result by doing

Re: [jQuery] Selector question

2007-03-28 Thread Kush Murod
thanks heaps Klaus and Jake, this is gold replies :) Klaus Hartl wrote: Kush Murod schrieb: Hi guys, This works ok $('td').children().is('img :[EMAIL PROTECTED]') Having said that I assumed I could also achieve same result by doing this $('td').children('img :[EMAIL PROTECTED]') and

Re: [jQuery] Selector question

2007-03-28 Thread Jake McGraw
The is() function returns true or false, the children() function returns a set of jQuery objects. So: $('td').children().is('img :[EMAIL PROTECTED]') Will return TRUE if the children contain atleast one img element with src attribute containing 'albled' or FALSE otherwise. While:

Re: [jQuery] Selector question

2007-03-28 Thread Kush Murod
thanks heaps Klaus and Jake, gold reply :) Klaus Hartl wrote: Kush Murod schrieb: Hi guys, This works ok $('td').children().is('img :[EMAIL PROTECTED]') Having said that I assumed I could also achieve same result by doing this $('td').children('img :[EMAIL PROTECTED]') and expected

Re: [jQuery] Selector question

2007-03-28 Thread spinnach
why not just $('ul li div.linkSubMenu ul.detailSubnav li a.selected').show() ? or even just $('a.selected').show() or you can set it in css a.selected { display: block; } dennis. Alexandre Plennevaux wrote: hello ! i have a menu which structure for each item is: (1) ul li

[jQuery] Selector question

2007-03-28 Thread Alexandre Plennevaux
hello ! i have a menu which structure for each item is: (1) ul li div.linkSubMenu ul.detailSubnavlia except for the selected menu, which is: (2) ul li div.linkSubMenu ul.detailSubnavlia.selected on load, all div.linkSubMenu are hidden (via css: display:none) i would like that

Re: [jQuery] Selector question

2007-03-28 Thread Jonathan Sharp
Try $('a.selected').parents().show(); as you need to show the parent elements, not the link. Cheers, -js On 3/28/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hello ! i have a menu which structure for each item is: (1) ul li div.linkSubMenu ul.detailSubnavlia except for the

Re: [jQuery] Selector question

2007-03-28 Thread Alexandre Plennevaux
Because it is its container, 3 levels above that is hidden . -Original Message- From: spinnach [mailto:[EMAIL PROTECTED] Sent: mercredi 28 mars 2007 20:38 To: [EMAIL PROTECTED]; jQuery Discussion Subject: Re: [jQuery] Selector question why not just $('ul li div.linkSubMenu

Re: [jQuery] Selector question

2007-03-28 Thread Alexandre Plennevaux
To: 'jQuery Discussion' Subject: [jQuery] Selector question hello ! i have a menu which structure for each item is: (1) ul li div.linkSubMenu ul.detailSubnavlia except for the selected menu, which is: (2) ul li div.linkSubMenu ul.detailSubnavlia.selected on load, all

Re: [jQuery] Selector question

2007-03-28 Thread Karl Swedberg
PROTECTED] On Behalf Of Alexandre Plennevaux Sent: mercredi 28 mars 2007 21:31 To: 'jQuery Discussion' Subject: [jQuery] Selector question hello ! i have a menu which structure for each item is: (1) ul li div.linkSubMenu ul.detailSubnavlia except for the selected menu, which is: (2) ul li

Re: [jQuery] Selector question

2007-03-28 Thread Klaus Hartl
Karl Swedberg schrieb: You might also be able to reduce this a bit, depending on your markup: $('a.selected').parents('div.linkSubMenu').show(); It seems a shame to traverse all the way down that set of nodes, only to have to traverse back up. What about some XPath magic:

Re: [jQuery] Selector question

2007-03-28 Thread Alexandre Plennevaux
it works! thanks a lot! _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Sharp Sent: mercredi 28 mars 2007 20:55 To: [EMAIL PROTECTED]; jQuery Discussion Subject: Re: [jQuery] Selector question Try $('a.selected').parents().show(); as you need to show

Re: [jQuery] selector question

2007-02-05 Thread Klaus Hartl
Karl Swedberg schrieb: On Feb 4, 2007, at 8:47 PM, Ⓙⓐⓚⓔ wrote: the great thing about dt and dd, is that they come in pairs! Well, not always. There can be multiple dd elements for each dt. Well, the other way round is also possible. Multiple dts with one dd. -- Klaus

[jQuery] selector question

2007-02-04 Thread Alexandre Plennevaux
hello, say i have a definition list: dttitle /dt dd this content blabla/dd dtanother title /dt dd another content blabla/dd i would like to have an event triggered on each dt that modifies its following dd, and only that one. i tried a few , but cannot get it to work correctly; it's

Re: [jQuery] selector question

2007-02-04 Thread Joel Birch
On 05/02/2007, at 12:37 PM, Alexandre Plennevaux wrote: hello, say i have a definition list: dttitle /dt dd this content blabla/dd dtanother title /dt dd another content blabla/dd i would like to have an event triggered on each dt that modifies its following dd, and only that one.

Re: [jQuery] selector question

2007-02-04 Thread Ⓙⓐⓚⓔ
the great thing about dt and dd, is that they come in pairs! $(dt).click( function() { $(this).next('dd').slideToggle(); }); aught to do it... On 2/4/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote: hello, say i have a definition list: dttitle /dt dd this content blabla/dd

Re: [jQuery] selector question

2007-02-04 Thread Karl Swedberg
On Feb 4, 2007, at 8:47 PM, Ⓙⓐⓚⓔ wrote: the great thing about dt and dd, is that they come in pairs! Well, not always. There can be multiple dd elements for each dt. If you run into a situation in which you need to select possibly more than one dd until the next dt, you can use John Resig's

Re: [jQuery] selector question

2007-02-04 Thread Alexandre Plennevaux
: lundi 5 février 2007 4:52 To: jQuery Discussion. Subject: Re: [jQuery] selector question On Feb 4, 2007, at 8:47 PM, Ⓙⓐⓚⓔ wrote: the great thing about dt and dd, is that they come in pairs! Well, not always. There can be multiple dd elements for each dt. If you run into a situation in which you