On Sep 26, 2007, at 2:47 AM, dimitrisX wrote:
I am trying to preload some images using either one of the functions below. They don't seem to load. I really could use your help here.
Something similar which works for me. Maybe you can find answer from there?
http://www.appelsiini.net/2007/6/sequentially-preloading-images
/// version 2 (not quite like the original) jQuery.preloadImages2 = function(){ var args = arguments; $(window).bind('load', function(){ var preload = new Array(); for(var i = 0; i<args.length; i++){ preload[i] = args[i]; } $(document.createElement('img')).bind('load', function(){ if(preload[0]){ this.src = preload.shift(); alert(this.src); } }).trigger('load').appendTo('#imagePanel'); }); }
-- Mika Tuupola http://www.appelsiini.net/