Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery.min.js"></script>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-git2.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
    
    
<div id="overlay"></div>   
    
    <a  style="position:absolute;" href="#" class="btn btn-default" data-toggle="active"> Button </a>
    <div class="ex-height"></div>
    
            
</body>
</html>
 
#overlay {
    position:absolute;
    width: 100%;
    height : 100%;
    background: #000;
    top: 0;
    left: 0;
    opacity:0;
    transition: opacity .3s;
    -moz-transition: opacity .3s;
    -webkit-transition: opacity .3s;
}
.backdrop {
    opacity: 0.4 !important;
}
.ex-height {
  height: 100%;
}
 
$(function() {
    
  function toggle() {
     $('#overlay').toggleClass('backdrop');
  }
    
  $('[data-toggle="active"]').click(toggle);
  
});
Output 300px

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

Dismiss x
public
Bin info
anonymouspro
0viewers