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

Reply via email to