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.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
<div class="alert alert-warning alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  <strong>Warning!</strong> Better check yourself, you're not looking too good.
</div>
</body>
</html>
 
.fade-out {
 opacity: 0;
 transition: all 2s ease;
}
 
$('.close').click(fadeOut);
$(document).on('transitionend', '.fade-out', removeFadedElement)
function fadeOut(event) {
  $(event.target).closest('.alert').addClass('fade-out');
}
function removeFadedElement(event) {
  $(event.target).remove();
}
Output 300px

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

Dismiss x
public
Bin info
pixelkritzelpro
0viewers