Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <script>
  (function($) {
    var deferreds = [],
        index;
  
    for (index = 0; index < 4; ++index) {
      deferreds.push($.getJSON("http://jsbin.com/agidot/1", function() {
        display("One finished");
      }));
    }
    $.when.apply($, deferreds).then(function() {
      display("All finished")
    });
    
    function display(msg) {
      $("<p>").html(String(msg)).appendTo(document.body);
    }
  })(jQuery);
  </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers