[jQuery] Re: Target secon

2007-11-19 Thread skube
You are correct. I was trying the example in my actual code, which had another child before the first that I failed to see. Thanks guys for your help and time!

[jQuery] Re: Target secon

2007-11-16 Thread Karl Swedberg
On Nov 16, 2007, at 5:59 PM, skube wrote: Nope, that results in all of the 's being hidden in the first : First Actually, Wizzud's suggestion worked for me when I tested it locally: $('div.myDiv p:not(:first-child)').hide() Hides all p elements that are descendants of and are not

[jQuery] Re: Target secon

2007-11-16 Thread skube
Nope, that results in all of the 's being hidden in the first : First

[jQuery] Re: Target secon

2007-11-16 Thread Wizzud
Try... $('div.myDiv p:not(:first-child)').hide(); On Nov 16, 9:17 pm, skube <[EMAIL PROTECTED]> wrote: > I figured out the following works: > > $('div.myDiv').each(function(){ > $(this).children('p').not(':first').hide(); > > }) > > However it still seems like there must be a better way. Anyone

[jQuery] Re: Target secon

2007-11-16 Thread skube
I figured out the following works: $('div.myDiv').each(function(){ $(this).children('p').not(':first').hide(); }) However it still seems like there must be a better way. Anyone?