tags:

views:

22

answers:

1
+2  A: 

You can do it using .wrapAll() like this:

jQuery('#page p').wrapAll('<div></div>');

Or using .wrapInner() like this:

jQuery('#page').wrapInner('<div></div>');
Nick Craver
`wrapAll("<div />")` is also acceptable I believe. Correct me if I'm wrong?
Nathan Taylor
@Nathan - It is, anything valid in `$(html)` is also valid here, just a bit less readable IMO :)
Nick Craver
Thank you very much.
Steve Forest
@Steve - Welcome :)
Nick Craver