How can I wrap just a part of an element’s content using jQuery?
<p>how can I wrap a part of a content when I have elements and normal text? I've tried <code>.after()</code> but this automaticaly adds a closing tag.</p>

<p>I have got this:</p>

<pre><code>&lt;div class="block"&gt;
    &lt;a href="#"&gt;example 1&lt;/a&gt;
    .
    &lt;a href="#"&gt;example 1&lt;/a&gt;
    .
    &lt;a href="#"&gt;example 1&lt;/a&gt;
    .
    &lt;a href="#"&gt;example 1&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>And I have to transform it to:</p>

<pre><code>&lt;div class="block"&gt;
    &lt;a href="#"&gt;example 1&lt;/a&gt;
    &lt;div class="wrap"&gt;
        .
        &lt;a href="#"&gt;example 1&lt;/a&gt;
        .
        &lt;a href="#"&gt;example 1&lt;/a&gt;
        .
        &lt;a href="#"&gt;example 1&lt;/a&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>
