"Collapsible Panel"
Bootstrap 3.3.0 Snippet by elbouillon

<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div class="col-md-6"> <div class="place-card panel panel-default"> <div class="panel-heading"> Super heading <span class="pull-right collapsable"><i class="glyphicon glyphicon-chevron-down"></i></span> </div> <div class="panel-body collapse"> Super body </div> </div> </div> </div>
/* Bootsnipp CSS */ .row{ margin-top:40px; padding: 0 10px; } /* Widget CSS */ .collapsable{ cursor: pointer; }
(function() { this.BsCollapsablePanel = (function() { function BsCollapsablePanel(panel_class) { if (panel_class == null) { panel_class = '.panel-heading span.collapsable'; } $(panel_class).click(function(e) { var $this; $this = $(this); $this.parents('.panel').find('.panel-body').collapse('toggle'); return $this.find('i').toggleClass('glyphicon-chevron-down glyphicon-chevron-up'); }); } return BsCollapsablePanel; })(); }).call(this); new BsCollapsablePanel(); // optionnaly you can pass the class/id of the button in your panel that move the body

Related: See More


Questions / Comments: