<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<div class="container">
<h2>Spoiler - using panel</h2>
<h4>Use</h4>
<p>Use <code>autocollapse</code> class on main <code>panel</code> element to auto-close spoiler on page-load.</p>
<p>Use <code>clickable</code> class on <code>panel-heading</code> element to be able to collapse the panel.</p>
<h4>Examles</h4>
<div class="panel panel-primary">
<div class="panel-heading clickable">
<h3 class="panel-title">Primary Title</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6">
<div class="panel panel-success autocollapse">
<div class="panel-heading clickable">
<h3 class="panel-title">
Success Title
</h3>
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert">SPOILER ALERT!</div>
</div>
</div>
<div class="panel panel-warning autocollapse">
<div class="panel-heading clickable">
<h3 class="panel-title">
Warning Title
</h3>
</div>
<div class="panel-body">
<div class="alert alert-danger" role="alert">SPOILER ALERT!</div>
</div>