 <p>You are invoking the <code>finished</code> function, instead of passing it as an argument. To pass it, use </p> <pre><code>$.when.apply($, deferred).then(finished); </code></pre> <p>Instead of </p> <pre><code>$.when.apply($, deferred).then(finished()); </code></pre>