so the load handler is very special... I didn't know about it! just loading
anything calls the load hander! brilliant!
On 2/5/07, Luke Lutman <[EMAIL PROTECTED]> wrote:
Ⓙⓐⓚⓔ 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/
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/