Ⓙⓐⓚⓔ wrote:
> I love the brevity of your solution!!
> $(document.createElement('img')).bind('load', function(){
> if(preload[0]) this.src = preload.shift();
> }).trigger('load');
Thanks ;-)
It works because the onload handler gets reused -- it fires after the
image finishes loading, which starts the next image loading, which
triggers the onload handler, which starts the next image ... and so on :-)
Luke
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/