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/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <h2>Click on the kitten!</h2>
  <div class="container">
    <img src="http://placekitten.com/g/300/200" />
    <div class="info-block">
      <p>Look at this cute kitten, he is really cute.</p>
    </div>
  </div>
</body>
</html>
 
.container {
  
  cursor: pointer;
  position: relative;
  overflow: hidden;
  
}
.info-block {
  
  background-color: rgba(255,255,255,0.5);
  padding: 20px;
  position: absolute;
  bottom: -70px;
  width: 100%;
  height: 30px;
  transition: bottom 0.5s;
  -moz-transition: bottom 0.5s;
  -o-transition: bottom 0.5s;
  -webkit-transition: bottom 0.5s;
  
}
.info-block.shown {
  
  bottom: 0;
  
}
 
jQuery(document).ready(function(){
  $('img').click(function(){
  
      $(this).siblings('.info-block').toggleClass('shown');
  
  });
});
Output

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

Dismiss x
public
Bin info
sunyatasattvapro
0viewers