On 16/01/07, Andreas Wahlin <[EMAIL PROTECTED]> wrote:
> Hi, I'd like to wrap three siblings into a div, sort of like
>
> <div ...>
> <textarea ...>
> <div ...>
>
> and transform it into
> <div>
> <div ...>
> <textarea ...>
> <div ...>
> </div>
>
>
> these three siblings also have more siblings that I want to leave out
> of the loop, so it's not entirely straightforward. Any ideas?
>
> Andreas
Without knowing exactly what you are trying to do, here is an idea
that may help.
Apply a class to them and select by that:
var mysiblings = $(".mysiblings");
Then create the div and append 'mysiblings' to it then add the div to
the desired location:
var mydiv = $("<div>").append(mysiblings).appendTo("#mycontainer");
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/