[jQuery] Selecting with "this"

2007-10-24 Thread linsms
Hi, I want to make a really simply thing: hide and show "p" elements in a list clicking in the first "p" I have this code in document.ready function: $('#texto>ol>li>p+*').hide(); $('#texto>ol>li>p').addClass('pointer'); $('#texto>ol>li>p').click(function(){

[jQuery] Re: Selecting with "this" SOLVED

2007-10-24 Thread linsms
}); On 24 oct, 15:28, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi, > > Rather than "+", try using "~". That should get all siblings that > follow. See this page in the API reference for more > info:http://docs.jquery.com/Selectors/siblings#prevsiblings

[jQuery] Re: Selecting with "this"

2007-10-24 Thread linsms
}); On 24 oct, 15:28, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi, > > Rather than "+", try using "~". That should get all siblings that > follow. See this page in the API reference for more > info:http://docs.jquery.com/Selectors/siblings#prevsiblings

[jQuery] Re: Selecting with "this"

2007-10-24 Thread linsms
x27;).hide(); > $('#texto>ol>li>p:eq(0)').addClass('pointer').click(function(){ > $(this).siblings().toggle(); > > }); > > See:http://docs.jquery.com/Traversing/siblings#expr > > Hope it helps (and works). > > --Erik > > On 10/2