ok. I see your point. Then do something like:
var _div = new Element( 'div');
var _body = $( document.body);
_body.getChildren().each( function( _item) { _div.grab( _item); });
_body.adopt( _div);
On Aug 27, 7:22 am, atwork8 <[email protected]> wrote:
> @ksamdev - Could you please read the problem. The results are
> completely different. The solution I've provided generates this:
>
> <body><div id="wrapper">body's html</div></body>
>
> Fabio's generates:
>
> <div id="wrapper"><body>body's html</body></div>