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(){
});
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
});
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
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
4 matches
Mail list logo