Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
  
  <style>
    
    .box { background: red; height: 200px; width: 200px; margin: 15px; }
    .a { height: 500px; width: 500px; background: blue; }
    
    .b { max-height: 0; overflow: hidden; transition: max-height 1s; transition-delay: 0; }
 
    
    .c { max-height: 0; overflow: hidden; transition: max-height 1s; transition-delay: 1s; }
    
  </style>
  
  
</head>
<body>
  
  <div class="a">
    
    <div class="b">
      <div class="box">b</div>
    </div>
    <div class="c">
      <div class="box">c</div>
    </div>
    
  </div>
</body>
</html>
 
setTimeout(function () {
  $(".b").css("max-height", "500px");
}, 500);
setTimeout(function () {
  $(".b").css("max-height", "0");
  $(".c").css("max-height", "500px");
}, 2000);
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers