Wrapping an Element using Pure JavaScript !
<p>I have a series of <code>div</code> tags on my page &amp; I want to wrap them all into a container. </p>

<pre><code>&lt;div class = "c" &gt;blah blah &lt;/div&gt;
&lt;div class = "c" &gt;blah blah &lt;/div&gt;
&lt;div class = "c" &gt;blah blah &lt;/div&gt;
</code></pre>

<p>I want to wrap all the above tags into a container as follows</p>

<pre><code>&lt;div class="container" &gt;
    &lt;div class = "c" &gt;blah blah &lt;/div&gt;
    &lt;div class = "c" &gt;blah blah &lt;/div&gt;
    &lt;div class = "c" &gt;blah blah &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I can do it using jQuery, I want learn how this is done in Pure Javascript ( I mean without any library or framework )
.
Can someone share the code to warp elements in javascript. </p>

<p>Thank you !!</p>
