title: Jquery img.load question
body: <p>I am using the jQuery <a href="http://malsup.com/jquery/cycle/" rel="nofollow noreferrer">cycle plugin</a> to cycle through some images.  These images are all contained inside a DIV.  I don't want the cycle plugin to run until after all of the images have loaded, or at least the first 4 or 5 so that an image doesn't appear that isn't loaded yet.  Is there an easy way of doing this?</p>
  
  <p>I tried adding a class 'lastImg' to the last img in the div and adding a 'load' event to that e.g.</p>
  
  <pre><code>Markup
  &lt;div id='cycle'&gt;
    &lt;img src=''/&gt;
    &lt;img src=''/&gt;
    &lt;img src='' class='lastImg'/&gt;
  &lt;/div&gt;
  
  JQuery
      $('lastImg').load(function(){
        $('#cycle').cycle({..});
      });
  </code></pre>
  
  <p>This seems okay in Chrome and FF, admittedly it's a little flakey (sometimes it doesn't work, maybe if the image is in the cache?) and not at all in IE (surprise, surprise...).</p>
  
  <p>Any other suggestions on how I can do this?</p>