How to wrap all text in html with another element?

zerokill

New Member
For instance:FROM \[code\]<div> whats up! <div> whats up2! </div> thank you for your help <div></div></div>\[/code\]TO\[code\]<div> <span>whats up!</span> <div><span> whats up2! </span></div> <span>thank you for your help</span> <div></div> <!---STAYS THE SAME --></div>\[/code\]How would I make something like this in jQuery or pure JavaScript?
 
Back
Top