Hmm.. Can't you clone the nodes and then just remove the _old_ parent div?

On 9/11/07, Pyrolupus <[EMAIL PROTECTED]> wrote:
>
>
> On Sep 11, 3:03 pm, "Brook Davies" <[EMAIL PROTECTED]> wrote:
> > Easy Question I think. If I use (from Jquery 1.2):
> >
> > $("#myElem").wrapAll("<div id='myDiv'></div>");
> >
> > To wrap the div 'myDiv' around 'myElem', how can I later remove that div
> > without removing the pre-existing myElem and any other contents of that
> div?
>
> I'm newish to jQuery, so my syntax is not the uberest, but something
> like the following would work:
>
> $('div#myDiv').after($('div#myDiv').children()).remove()
>
> In fact, it does work--I just tested it in FireBug.  (I just don't
> know the correct syntax to avoid referring to div#myDiv twice.)
>
> Pyro
>
>


-- 
Joan Piedra  ||  Frontend web developer
http://www.justaquit.com/  ||  http://www.joanpiedra.com/

Reply via email to