"FAQ with Categories"
Bootstrap 3.0.0 Snippet by s8990

<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 class="container"> <div class="row"> <div class="col-md-6 col-md-offset-3"> <!-- Nav tabs category --> <ul class="nav nav-tabs faq-cat-tabs"> <li class="active"><a href="#faq-cat-1" data-toggle="tab">yahoo</a></li> <li><a href="#faq-cat-2" data-toggle="tab">website</a></li> </ul> <!-- Tab panes --> <div class="tab-content faq-cat-content"> <div class="tab-pane active in fade" id="faq-cat-1"> <div class="panel-group" id="accordion-cat-1"> <div> matni ke ma mikhaym </div> </div> </div> <div class="tab-pane fade" id="faq-cat-2"> <div class="panel-group" id="accordion-cat-2"> <div> matni k vase website </div> </div> </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: