I have a div that looks like this:
<div class="wrapper">
...contents...
</div>
I'd like to do this using JavaScript:
<div class="wrapper">
<div class="contents-wrapper">
...contents...
</div>
</div>
I did a quick Google search, but couldn't find what I was looking for. Is there a simple way to do this in JavaScript or jQuery?
EDIT
The current answer wraps all the contents in a div rather than just wrapping all the contents all together in one div.
Current code:
<div class="wrapper">
<div class="contents-wrapper">
<div></div>
</div>
<div class="contents-wrapper">
<div></div>
</div>
</div>
What I want achieved:
<div class="wrapper">
<div class="contents-wrapper">
<div></div>
<div></div>
</div>
</div>