This example illustrates how the responsive tabs works. It uses the standard Bootstrap 2.3.2 responsive CSS and HTML, so it also adapts to your viewport and device.
To see the difference just resize the width of your window.
responsive
class to the ul
that is used to create the tabs.responsive
class to the div
that is used to create the tab-content.fakewaffle.responsiveTabs(['phone', 'tablet']);
in your load up script, while passing an array of bootstrap sizes that you want the to be displayed as accordions, e.g. ['phone', 'tablet'] which is used by default.fakewaffle.responsiveTabs();
function.
<ul class="nav nav-tabs responsive" id="myTab"> <li class="active"><a href="#home">Home</a></li> <li><a href="#profile">Profile</a></li> <li><a href="#messages">Messages</a></li> </ul> <div class="tab-content responsive"> <div class="tab-pane active" id="home">...content...</div> <div class="tab-pane" id="profile">...content...</div> <div class="tab-pane" id="messages">...content...</div> </div> <script type="text/javascript"> (function($) { fakewaffle.responsiveTabs(['xs', 'sm']); })(jQuery); </script>