JS insertBefore/preprendTo not working after Ajax call
<p>I have a div inside a container i want to move out of this container. The HTML is here:</p>

<pre><code>&lt;li class="item last"&gt;
&lt;div class="product-info" id="product-info"&gt;
    &lt;p class="special-price-label" id="special-price-label"&gt;
        &lt;span class="price percent-label"&gt;
            &lt;span class="percent-label-inner-container"&gt;
                &lt;span class="percent-label-label"&gt;SPAR&lt;/span&gt;
                &lt;span class="percent-label-value"&gt;42%&lt;/span&gt;
            &lt;/span&gt;
        &lt;/span&gt;
    &lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
</code></pre>

<p>I want to move #special-price-label out of the .product-info container so the HTML becomes this:</p>

<pre><code>&lt;li class="item last"&gt;
&lt;p class="special-price-label" id="special-price-label"&gt;
    &lt;span class="price percent-label"&gt;
        &lt;span class="percent-label-inner-container"&gt;
            &lt;span class="percent-label-label"&gt;SPAR&lt;/span&gt;
            &lt;span class="percent-label-value"&gt;42%&lt;/span&gt;
        &lt;/span&gt;
    &lt;/span&gt;
&lt;/p&gt;
&lt;div class="product-info" id="product-info"&gt;

&lt;/div&gt;
&lt;/li&gt;
</code></pre>

<p>It worked fine with this JS:</p>

<pre><code>&lt;script type="text/javascript"&gt;
( function($) {
$('#special-price-label').each(function() {
    $(this).insertBefore($(this).parent());
})
} ) ( jQuery );
&lt;/script&gt;
</code></pre>

<p>But after i put some InfiniteScroll with Ajax on the page (it is a category page with products) it doesn't work anymore.</p>

<p>I also tried with this code instead without luck:</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {
    $( "#special-price-label" ).prependTo( "li.item" );
});
&lt;/script&gt;
</code></pre>

<p>Can you help me?</p>