Jquery resize function not working when trying to resize images loaded after document ready
<p>I have a plugin which loads images after document ready.</p>

<p>In order for it to work, the image source looks like this:</p>

<p></p>

<p>The script shows the <strong>loader.gif</strong> until the image is loaded and then replaces that gif with <strong>the_actual_image.jpg</strong></p>

<p>Here is how I call the function:</p>

<pre><code>function mylazyload() {
    $("img.lazy").show();
    var timeout = setTimeout(function(){$(".models img.lazy").lazyload({effect : "fadeIn"})}, 800);
}
</code></pre>

<p>I have a re-size function which I call after the mylazyload(); function:</p>

<pre><code>jQuery(document).ready(function($){      
    mylazyload();
    resize_images();
});
</code></pre>

<p>Here is the re-size function:</p>

<pre><code>function resize_images() {
    var maxHeight = $(".defx img").height();
    $(".model img.lazy").each(function() {
        var $this = $(this);
        if ($this.height() &gt; maxHeight || $this.height() &lt; maxHeight) {
            $this.removeAttr('style').css("height","auto");
            $this.css('height', maxHeight);
        }
    });
}
</code></pre>

<p>The <strong>PROBLEM</strong> is that the resize function seems to work on the <strong>loader.gif</strong>, not resizing <strong>the_actual_image.jpg</strong>.</p>

<p>Any ideas why?</p>
