Dawid van der Hoven Dawid van der Hoven - 8 months ago 50
HTML Question

Collapse div element based on screen size

I was just wondering how, based on screen size, could you use bootstraps accordion, so for example lets say i have a div I want to display regularly on everything but when in mobile view I want it to collapse.

Any suggestions?


You can make use of responsive utility classes in bootstrap check this page for more details http://twitter.github.com/bootstrap/scaffolding.html#responsive

Something Like

  <div class="visible-phone">accordion</div> 
  <div class="visible-desktop">all data you want to display</div>

Jsfiddle demo