Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  article, aside, figure, footer, header, hgroup, 
  menu, nav, section { display: block; }
  
  .box {
    border: thin solid;   
    position: absolute;    
    height: 100px;
    width: 100px;
  }
  
  .n1{
    left: 100px;
    top: 100px;
    z-index : 10;
  }
  
  .n2{
    left: 130px;
    top: 130px;
    z-index  : 11;
  }
  
  .n3{
    left: 150px;
    top: 150px;
    z-index  : 12;
  }
  
  .blue{
     background-color: blue;
  }
  
  .red{
     background-color: red;
  }
  
  .green{
     background-color: green;
  }
  
</style>
</head>
<body>
    
  <div class="box n1 blue">&nbsp;</div>
  <div class="box n2 red">&nbsp;</div>
    <div class="box n3 green">&nbsp;</div>
</body>
</html>
 
var zindex = $(".box").css('z-index');
$(".box").click( function () {
   var zindex = $(this).css('z-index');     
   $(this).css('z-index',-1);
});
  
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers