JQuery remove image src prefix
<p>I have a bunch of images on a page that are contained within a div with a class of content-block like this:</p>

<pre><code>&lt;div class="content-block"&gt;
    &lt;img src="../images/path/path/image.jpg" alt="blah" title="blah" /&gt;
    &lt;img src="../images/path/path/image.jpg" alt="blah" title="blah" /&gt;
    &lt;img src="../images/path/path/image.jpg" alt="blah" title="blah" /&gt;
    &lt;img src="../images/path/path/image.jpg" alt="blah" title="blah" /&gt;
    &lt;img src="../images/path/path/image.jpg" alt="blah" title="blah" /&gt;
&lt;/div&gt;
</code></pre>

<p>I am loading this html into a div via ajax. When I load it in I need to remove the "../" before the image path, after it loads in so the path remains correct. Can this be done with JQuery? Many thanks in advance.</p>

<p>MY JQUERY CODE FOR LOADING IN THE HTML:</p>

<pre><code>$(document).ready(function() {
$('.projects a').click(function(event) {
    $('#work').load(this.href + ' #loadwork');
    event.preventDefault();
});
</code></pre>

<p>});</p>

<p>EDIT</p>

<pre><code>$(document).ready(function() {
$('.projects a').click(function(event) {
    $('#work').load(this.href + ' #loadwork', function(){
           $('.content-block&gt;img').each(function(){
           $(this).attr('src',$(this).attr('src').replace('../',''));
        });
    });
    event.preventDefault();
});
</code></pre>

<p>});</p>
