http://mootools.net/docs/core/Element/Element#Element:wraps
new Element('div', {'id': 'wrapper'}).wraps(document.body);
--
Fábio Miranda Costa
Solucione Sistemas
Front-End Engineer
http://meiocodigo.com
On Thu, Aug 27, 2009 at 7:53 AM, atwork8 <[email protected]> wrote:
>
> Hi,
>
> I've checked the docs but I can't see any method for wrapping the html
> of an element, not the whole element. If I wanted to add a wrapper
> around the body's html is this the best way of doing it:
>
> var elBody = $(document.body);
> elBody.set('html', '<div id="wrapper">' + elBody.get('html') + '</
> div>');