Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div class="viewport">
    <div class="wrap">
      <a class="toggle">toggle list</a>
      <ul>
        <li>first</li>
        <li>second</li>
        <li>third</li>
      </ul>
    </div>
  </div>
</body>
</html>
 
.viewport {
  height: 400px;
  border: 1px solid red;
  width: 200px;
  position: relative;
}
a {
  display: block;
  cursor: pointer;
}
.wrap {
  position: absolute;
  border: 1px solid green;
  display: block;
  width: 100%;
  
  /* this should really be the height of the list */
  bottom: -57px; 
}
ul {
  margin: 0;
  border: 1px solid blue;
  width: 100%;
  padding: 0;
}
 
$(function() {  
  var hidden = true;
  $(".toggle").click(function() {
    if (hidden) {
      $(".wrap").animate({ bottom: 0 });
      hidden = false;
    } else {
      $(".wrap").animate({ bottom: -57 });
      hidden = true;
    }
  });
});
Output

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

Dismiss x
public
Bin info
darthdeuspro
0viewers