"Panels"
Bootstrap 3.1.0 Snippet by escapedlion

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.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 ----------> <br> <br> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="panel panel-success"> <div class="panel-heading"> <h3 class="panel-title"> Click Button </h3> <a class="btn btn-success btn-clickable pull-right" href="#"> <i class="fa fa-chevron-down"></i> </a> </div> <div class="panel-body"> </div> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="panel panel-info"> <div class="panel-heading"> <h3 class="panel-title"> Click Button </h3> <a class="btn btn-info btn-clickable pull-right" href="#" style="margin-left:5px;"> <i class="fa fa-chevron-right"></i> </a> <a class="btn btn-info btn-clickable pull-right" href="#" style="margin-right:5px;"> <i class="fa fa-chevron-left"></i> </a> </div> <div class="panel-body"> <div class="col-sm-6 col-md-4"> <div class="thumbnail"> <img data-src="holder.js/350x260" alt="Generic placeholder thumbnail"> <div class="caption"> <h3>Thumbnail label</h3> <p><a href="#" class="btn btn-primary" role="button">Button</a> <a href="#" class="btn btn-default" role="button">Button</a></p> </div> </div> </div> </div> </div> </div> </div> </div>
@import url(http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css); .panel-heading .btn-clickable { display: inline-block; margin-top: -25px; font-size: 15px; margin-right: -10px; padding: 4px 10px; border-radius: 4px } .panel-heading span { margin-top: -23px; font-size: 15px; margin-right: -9px; } div.container div.row div.col-md-12 div.panel div.panel-heading h3.panel-title { font-size: 20px; font-weight: 700pt; |
$(document).on('click', '.panel-heading .btn-clickable', function(e){ var $this = $(this); if(!$this.hasClass('panel-collapsed')) { $this.parents('.panel').find('.panel-body').slideUp(); $this.addClass('panel-collapsed'); $this.find('i').removeClass('fa-chevron-up').addClass('fa-chevron-down'); } else { $this.parents('.panel').find('.panel-body').slideDown(); $this.removeClass('panel-collapsed'); $this.find('i').removeClass('fa-chevron-down').addClass('fa-chevron-up'); } })

Related: See More


Questions / Comments: