Hi,

> > That does not help, if your loaded script needs to load another script.
>
> For example:
>
> file "a.js" is [ $.getScript( "b.js", function() { doA(); } ); ]
> file "b.js" is [ $.getScript( "c.js", function() { doB(); } ); ]
> file "c.js" is [ doC(); ]
> the page has: [ script src=jquery.js - script src=a.js ]
>
> You say that the order could be: doB(); doC(); doA(); instead of: doC();
> doB(); doA(). Or also that doA() could happen before the end?

No, the order could be doA() doC() doB(). That is because doA() is called as 
soon as b.js is loaded but before c.js is loaded. The call to $.getScript() 
in b.js returns immediatelly and loads c.js assynchonously. Then b.js is 
finished and doA() is called while c.js is still loading.

Christof

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to