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