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
"Collapsible Panel Responsive"
Bootstrap 3.3.0 Snippet by
meetshah
3.3.0
panel
responsive
Preview
HTML
CSS
JS
View Full Screen
Fork
Fork this
15.9K
 
8 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="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="panel_content"> <div class="container"> <div class="row"> <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12"> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="panel panel-primary product-type"> <div class="panel-heading"> <h3 class="panel-title">Grommet Type</h3> <span class="pull-right clickable"><i class="glyphicon glyphicon-plus-sign collapse-ico"></i></span> </div> <div class="panel-body"> <ul class="panel_product_type"> <li>Ventilation Tubes </li> <li>Armstrong Grommet</li> <li>Bevel Bobbin</li> <li>Paparella</li> <li>Spooner</li> </ul> </div> </div> </div> <div class="col-lg-12 col-md-12 col-sm-12"> <div class="panel panel-primary product-size"> <div class="panel-heading"> <h3 class="panel-title">Grommet Size</h3> <span class="pull-right clickable"><i class="glyphicon glyphicon-plus-sign collapse-ico"></i></span> </div> <div class="panel-body"> </div> </div> </div> <div class="col-lg-12 col-md-12 col-sm-12 product-use"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Use Of Grommet</h3> <span class="pull-right clickable"><i class="glyphicon glyphicon-plus-sign collapse-ico"></i></span> </div> <div class="panel-body"> </div> </div> </div> </div> </div> </div> </div>
.panel_content { background-color: #eceff7; } .clickable{ cursor: pointer; } .panel { background-color: #fff; border: 1px solid transparent; border-radius: 0; /*-webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05);*/ /*box-shadow: 0 1px 1px rgba(0,0,0,.05);*/ } .product-type { margin-top: 45px; } .product-size { margin-top: 25px; } .product-use { margin-top: 25px; margin-bottom: 25px; } .panel-heading span { margin-top: -20px; font-size: 15px; } .panel-primary>.panel-heading { color: #000; background-color: #fff; border-bottom: 1px solid #eeeeee; padding-top: 20px; padding-bottom: 20px; } .panel-title { font-size: 22px; font-weight:400; } .panel_product_type { margin-top: 20px; } .panel_product_type { line-height: 26px; } .panel_product_type { font-size: 18px; font-weight: 400; color: black; }
$(document).on('click', '.panel-heading span.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('glyphicon glyphicon-minus-sign').addClass('glyphicon glyphicon-plus-sign'); } else { $this.parents('.panel').find('.panel-body').slideDown(); $this.removeClass('panel-collapsed'); $this.find('i').removeClass('glyphicon glyphicon-plus-sign').addClass('glyphicon glyphicon-minus-sign'); } })
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76