title: jquery : wait until all ajax calls finish then continue
body: <p>I have some ajax calls in my document.ready()</p>
  
  <p>like :</p>
  
  <pre><code>for (j=1; j &lt;= 7; j++){
    (function(index) {
      $.getJSON('my.php', {id:index}, 
        function(data) {
           $.each(data, function(index2, array){
           ........
           });  
        });
      })(j)
  } 
  
  //DO NOT CONTINUE UNTIL FINISH AJAX CALLS   
  
   ........
  MORE JQUERY CODE
  </code></pre>
  
  <p>How can i force it to wait and not continue until we get all the call backs from the ajax requests ?</p>