Thanks Scott and Karl !

Now I got it, I was missing the $(this) trick to get a jquery object
from a dom one. I've added it to the wiki (on each and on get
sections).

Xavier

On Apr 12, 4:28 pm, Scott Sauyet <[EMAIL PROTECTED]> wrote:
> xavier wrote:
> > I have a two level list :
> > [ ... ]
> > I want to take all the first level a and copy them as the first
> > element in the list:
>
> There might be something simpler, but I think this would work:
>
> $("ul ul").siblings("a").each(function(i) {
>
> $(this).next().prepend($(this).clone()).children().eq(0).wrap("<li></li>");
>
> });
>
> Good luck,
>
>    -- Scott

Reply via email to