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!
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
Nope, that results in all of the 's being hidden in the first
:
First
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
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?
5 matches
Mail list logo