Toggle navigation
Bootsnipp
Bootstrap
For
CSS Frameworks
Bootstrap
Foundation
Semantic UI
Materialize
Pure
Bulma
References
CSS Reference
Tools
Community
Page Builder
Form Builder
Button Builder
Icon Search
Dan's Tools
Diff / Merge
Color Picker
Keyword Tool
Web Fonts
.htaccess Generator
Favicon Generator
Site Speed Test
Snippets
Featured
Tags
By Bootstrap Version
4.1.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.1
3.0.0
2.3.2
Register
Login
"Bootstrap Accordion Panel with Body Collapse"
Bootstrap 3.3.0 Snippet by
hingram
3.3.0
panel
accordion
collapse
Preview
HTML
JS
View Full Screen
Fork
Fork this
9.1K
 
3 Fav
Post to Facebook
Tweet this
<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);
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76