Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <div id="box" class="box"></div>
  
  <button>TOGGLE VISIBILITY</button>
</body>
</html>
 
.box {
  background: goldenrod;
  width: 300px;
  height: 300px;
  margin: 30px auto;
  transition: all 2s linear;
  display: block;
}
.hidden {
  display: none;
  opacity: 0;
}
button {
  display: block;
  margin: 0 auto;
}
 
var box = $('#box');
$('button').on('click', function () {
  box.toggleClass('hidden');
});
Output

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

Dismiss x