How does the 'fx' queue in jquery auto start?
<p>I have read many answers and blog posts on the jQuery queues... and specifically this particular answer has helped a lot - <a href="http://stackoverflow.com/a/3314877/1315811">http://stackoverflow.com/a/3314877/1315811</a> . But, both standard docs on jquery.com and the answer above got me to look at the jquery code <a href="http://code.jquery.com/jquery-1.7.2.js" rel="nofollow">http://code.jquery.com/jquery-1.7.2.js</a></p>

<p>What I cannot understand - from the code - how does the 'fx' (default) queue auto-start. Especially after the queue has been emptied.</p>

<p>For example on a custom queue, when you manually start the queue, and the queue runs out of functions to call, any reference to the queue are no longer invalid, so I would expect somewhere in the jquery code an attempt to figure out the state of the queue and if it was empty auto start it? The code kinda demonstrates what I ran into, if I am just missing a piece of code (I am look at line: 2060-2160 in the above mentioned code) please let me know.</p>

<pre><code>&gt; var aq = $({});
&gt; aq.queue("mp").length
0
&gt; n1 = aq.queue("mp")
[]
&gt; n1.length
0
&gt; aq.queue("mp", function (next) { setTimeout(next, 5000); })
[Object]
&gt; aq.queue("mp", function (next) { setTimeout(next, 5000); })
[Object]
&gt; aq.queue("mp", function (next) { setTimeout(next, 5000); })
[Object]
&gt; n1.length
0
&gt; aq.queue("mp").length
3
&gt; n1 = aq.queue("mp"); // reset n1 to the "new" queue...
&gt; n1.length
3
</code></pre>

<p>Also, if any part of this is unclear, please let me know and I will update accordingly.</p>
