I am trying to figure out how to make a slide left, right, up, down between two tabs of Bootstrap 3.
I searched the Internet and, surprisingly, did not find anything.
The closest thing I found was IT on Bootstrap github. However, it refers to Bootstrap 2.0.2 and no longer works for Bootstrap 3.
Does anyone know how to shift left, right, up, down (all or all) between two tabs of Bootstrap 3?
Here is the basic setup of the Bootstrap 3 bookmark that I am using.
<ul class="nav nav-tabs"> <li class="active"><a href="#home" data-toggle="tab">Home</a></li> <li><a href="#profile" data-toggle="tab">Profile</a></li> <li><a href="#messages" data-toggle="tab">Messages</a></li> <li><a href="#settings" data-toggle="tab">Settings</a></li> </ul> <div class="tab-content"> <div class="tab-pane active" id="home"> home page content </div> <div class="tab-pane" id="profile"> profile page content </div> <div class="tab-pane" id="messages">message page content </div> <div class="tab-pane" id="settings">settings content</div> </div>
I will activate my tabs in one of the following ways.
$('#myTab a[href="#profile"]').tab('show') // Select tab by name $('#myTab a:first').tab('show') // Select first tab $('#myTab a:last').tab('show') // Select last tab $('#myTab li:eq(2) a').tab('show') // Select third tab (0-indexed)
Instead of just switching to pages when I do a “show,” I would like to “shift” the old tab left or right while moving to a new tab. Even if the old tab had to budge first and then move the new tab, that would be acceptable. However, I prefer the former.
jquery twitter-bootstrap twitter-bootstrap-3 tabs css-animations
fat fantasma
source share