S
S
SokolovArtur2016-07-12 20:31:12
css
SokolovArtur, 2016-07-12 20:31:12

How to collapse .panel Bootstrap on tablets?

Bootstrap question . I am using the Panels component.

<div class="row">
  <div class="col-md-4">
    <div class="panel panel-default">
      <div class="panel-heading">Panel title</div>
      <div class="panel-body">Panel content</div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="panel panel-default">
      <div class="panel-heading">Panel title</div>
      <div class="panel-body">Panel content</div>
    </div>
  </div>
  <div class="col-md-4">
    <div class="panel panel-default">
      <div class="panel-heading">Panel title</div>
      <div class="panel-body">Panel content</div>
    </div>
  </div>
</div>

When the browser window is reduced, I want the panels to collapse like an accordion. How can you do?
ccd772877cf446c5bbb6875d18b856f4.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2016-07-12
@SokolovArtur

Alternatively, panel-bodyadd the class for hidden-xs. And panel-headinghang on

$(this).siblings('.panel-body').toggleClass('hidden-xs')
.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question