"FAQ with Categories"
Bootstrap 3.0.0 Snippet by mhmanik

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.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 id="faq-cat-1" class="tab-pane active in fade"> <div id="accordion-cat-1" class="panel-group"> <div class="panel panel-default panel-faq"> <div class="panel-heading"> <a href="#faq-cat-1-sub-1" data-parent="#accordion-cat-1" data-toggle="collapse" class="collapsed"> <h4 class="panel-title"> FAQ Item Category #1 <span class="pull-right"><i class="glyphicon glyphicon-plus"></i></span> </h4> </a> </div> <div class="panel-collapse collapse" id="faq-cat-1-sub-1" style="height: 0px;"> <div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="panel panel-default panel-faq"> <div class="panel-heading active-faq"> <a href="#faq-cat-1-sub-2" data-parent="#accordion-cat-1" data-toggle="collapse" class=""> <h4 class="panel-title"> FAQ Item Category #1 <span class="pull-right"><i class="glyphicon glyphicon-minus"></i></span> </h4> </a> </div> <div class="panel-collapse in" id="faq-cat-1-sub-2" style="height: auto;"> <div class="panel-body"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> </div> </div>
body { padding-top: 30px; } .faq-cat-content { margin-top: 25px; } .faq-cat-tabs li a { padding: 15px 10px 15px 10px; background-color: #ffffff; border: 1px solid #dddddd; color: #777777; } .nav-tabs li a:focus, .panel-heading a:focus { outline: none; } .panel-heading a, .panel-heading a:hover, .panel-heading a:focus { text-decoration: none; color: #777777; } .faq-cat-content .panel-heading:hover { background-color: #efefef; } .active-faq { border-left: 5px solid #888888; } .panel-faq .panel-heading .panel-title span { font-size: 13px; font-weight: normal; }
$(document).ready(function() { $('.collapse').on('show.bs.collapse', function() { var id = $(this).attr('id'); $('a[href="#' + id + '"]').closest('.panel-heading').addClass('active-faq'); $('a[href="#' + id + '"] .panel-title span').html('<i class="glyphicon glyphicon-minus"></i>'); }); $('.collapse').on('hide.bs.collapse', function() { var id = $(this).attr('id'); $('a[href="#' + id + '"]').closest('.panel-heading').removeClass('active-faq'); $('a[href="#' + id + '"] .panel-title span').html('<i class="glyphicon glyphicon-plus"></i>'); }); });

Related: See More


Questions / Comments: