"Bootstrap Accordion Panel with Body Collapse"
Bootstrap 3.3.0 Snippet by hingram

<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="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> <div class="container"> <div class="row"> <div class="dropdownPanel panel panel-default"> <div class="panel-heading clearfix"> <h3 class="panel-title pull-left">Market Locations</h3> </div> <ul class="list-group"> <li class="list-group-item"> <div class="dropdown-heading" role="tab" id="heading-1"> <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-1" aria-expanded="true" aria-controls="collapse-1"> <i class="more-less pull-right glyphicon glyphicon-chevron-down"></i> Tenino, WA </a> </div> <div id="collapse-1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-1"> <div class="panel-body"> <hr> <div class="col-md-12 col-lg-2"> <i class="fa fa-map-marker" aria-hidden="true"></i> Address: </div> <div class="col-md-12 col-lg-4"> 18310 Gilbert St<br /> Tenino, WA 98503 </div> <div class="col-md-12 col-lg-2"> <i class="fa fa-phone" aria-hidden="true"></i> Phone: </div> <div class="col-md-12 col-lg-4"> 867-5309 </div> </div> </div> </li> <li class="list-group-item"> <div class="dropdown-heading" role="tab" id="heading-2"> <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-2" aria-expanded="true" aria-controls="collapse-2"> <i class="more-less pull-right glyphicon glyphicon-chevron-down"></i> Lacey, WA </a> </div> <div id="collapse-2" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-2"> <div class="panel-body"> <hr> <div class="col-md-12 col-lg-2"> <i class="fa fa-map-marker" aria-hidden="true"></i> Address: </div> <div class="col-md-12 col-lg-4"> 500 Lacey Blvd<br /> Lacey, WA 98503 </div> <div class="col-md-12 col-lg-2"> <i class="fa fa-phone" aria-hidden="true"></i> Phone: </div> <div class="col-md-12 col-lg-4"> 867-5309 </div> </div> </div> </li> </ul> </div> </div> </div>
function toggleIcon(e) { $(e.target) .prev('.dropdown-heading') .find(".more-less") .toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); } $('.dropdownPanel').on('hidden.bs.collapse', toggleIcon); $('.dropdownPanel').on('shown.bs.collapse', toggleIcon);

Related: See More


Questions / Comments: