title: jQuery $.when with deferreds not working
body: <p>What I'm trying to do is make some action happen when two simultaneous image loads via ajax are done. To do this I created a custom Deferred to be resolved when the image loads are done. </p>
  
  <pre><code>&lt;div id="i"&gt;&lt;/div&gt;
  </code></pre>
  
  <pre><code>$(document).ready(function() {
      $('#i').hide();
      var imgLoad = loadImgs();
      $.when(imgLoad).then(function() {
          $('#i').show('slow');
      });
  });
  
  function loadImgs() {
      var dfd = $.Deferred();
  
      var matrix = $.getJSON("https://graph.facebook.com/thematrixmovie");
      var pulp = $.getJSON("https://graph.facebook.com/pulpfiction");
  
      $.when(matrix, pulp).then(function(m, p) {
          mImg = '&lt;img src=' + m[0].picture + '&gt;';
          pImg = '&lt;img src=' + p[0].picture + '&gt;';
          $('#i').show().append(mImg + pImg);
          dfd.resolve;
      });
      return dfd.promise();
  }
  </code></pre>
  
  <p>You can try this <a href="http://jsfiddle.net/zorro/CDXf2/3/" rel="nofollow">on JSFiddle</a>.</p>
  
  <p>I've used Eric Hynds <a href="http://www.erichynds.com/jquery/using-deferreds-in-jquery/" rel="nofollow">post</a> including a <a href="http://jsfiddle.net/ehynds/JSw5y/" rel="nofollow">working example</a> as a reference but still haven't gotten it to work. Any ideas?</p>