title: Multiple ajax requests in jQuery with many arguments in $.when method
body: <p>Can I make multiples jquery ajax requests with the <code>$.when</code> method, without knowing the number of arguments? </p>
  
  <p>This is my code:</p>
  
  <pre><code> var ajax_loaded = new Array();
  
      $('.chart input[name^="qtd"]').each(function()
      {        
          ajax_loaded.push(function(){$.ajax({
              url : www + 'chart/add',
              type : 'POST',
              data : {
                 qtde: $(this).val(), 
                 idProd: $(this).prev().val()
              }
          })});
      });
  
      $.when(ajax_loaded ).done(function(){
          alert('Done');
      });
  </code></pre>