This example illustrates using JIT to load the YUI Calendar widget. Just in case the YAHOO servers are not slow enough, we've added a call to a sleeping_js file on felocity.org which sleeps for 5 seconds before returning script to simulate a network delay.
Additionally, this uses the "chain" call in order to string multiple Javascript calls together in a blocking queue.
To see the round robin loading style, click on the second link within the first 5 seconds of clicking on the first link. What's happening underneath is a call to a sleeping JS file, followed by another call to a sleeping JS file. This lets us simulate a really bad server. Other scripts should not be held up by the first chain's slow time. Due to the single threaded nature of JS, the best we can hope for is put all pending verifiers in the setTimeout queue, which will promptly resolve when the slow script executes, but before the next slow script runs.