image preloader not working in IE
<p>I have the following code to preload images:</p>

<pre><code>preloader : function(images) {
        var imgCount = images.length;
        var counter = 0;
        $.each(images, function(i, n) {
            alert('hi');
           // load each image
           $("&lt;img /&gt;").attr("src", n).load(function() {
               counter++;
               if(imgCount == counter) {
                   $('#loader').hide();
                   $('#wheel').show();
               }
           });
        });
    }
</code></pre>

<p>which I'm calling like so:</p>

<pre><code>preloader(['../images/image1.png','../images/image2.png','../images/image3.png']);
</code></pre>

<p>It works fine in firefox but in IE it doesn't work. I get all 3 alerts back so the each loop runs but it only ever loads the first image. If I out just one image in the array I get in to the final if statement and the div's are shown and hidden. But any more than one image and Ie trips up. As i say this works fine in FF so it's not a problem with paths to images or images missing etc.</p>

<p>Any idea? I'm really stumped on this.</p>
