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"
Bootstrap 3.1.0 Snippet by
ccela
3.1.0
panel
Preview
HTML
CSS
JS
View Full Screen
Forked from
Fork
Fork this
Parent
932
 
0 Fav
Post to Facebook
Tweet this
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.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-no-margin"> <div class="col-md-12"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Panel 1</h3> <span class="pull-right clickable"><i class="glyphicon glyphicon-chevron-up"></i></span> </div> <div class="panel-body"> <select class="form-control" id="status" name="status"> <option>En Uso</option> <option>Bodega</option> <option>Dañado</option> </select> <table class="table table-bordered"> <thead> <tr> <th>#</th> <th>Имя</th> <th>Фамилия</th> <th>Ник</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mark</td> <td>Otto</td> <td><input id="name" class="form-control" placeholder="как вас зовут.."></td> </tr> <tr> <td>2</td> <td>Jacob</td> <td><input id="name" class="form-control" placeholder="как вас зовут.."></td> <td>@fat</td> </tr> <tr> <td>3</td> <td><input id="name" class="form-control" placeholder="как вас зовут.."></td> <td>the Bird</td> <td>@twitter</td> </tr> </tbody> </table> </div> </div> </div> </div> </div>
.row{ margin-top:5px; padding: 0 10px; } .row-no-margin { margin-top:5px; margin-left: 0px; margin-right: 0px; } .clickable{ cursor: pointer; } .panel-heading span { margin-top: -20px; font-size: 15px; } .form-control{border:0; box-shadow:none} .form-control:focus{box-shadow:none;} label{color:#999; padding-top: 5px; display:block; left:0; width:100%} .panel{border-width:2px; border-radius:7px} .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td{border:2px solid #eee; vertical-align: middle;} .table-bordered{border-radius:7px} .form-control::-moz-placeholder { color: #999; opacity: 1 } .form-control:-ms-input-placeholder { color: #999 } .form-control::-webkit-input-placeholder { color: #999 }
$(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-chevron-up').addClass('glyphicon-chevron-down'); } else { $this.parents('.panel').find('.panel-body').slideDown(); $this.removeClass('panel-collapsed'); $this.find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up'); } })
Questions / Comments:
Post
Posting Guidelines
Formatting
- Now
×
Close
Donate
BTC: 12JxYMYi6Vt3mx3hcmP3B2oyFiCSF3FhYT
ETH: 0xCD715b2E3549c54A40e6ecAaFeB82138148a6c76