(Latest release, v1.1 on 02/09/2011)
VerticalTabs organizes images or blocks of markup into a simple, attractive, and easily styled tab layout. The markup only requires a div and two unordered lists so the plugin degrades gracefully when JavaScript is disabled. This extraordinarily lightweight plugin is ideal for maximizing the content’s impact on the user when screen real estate is at a minimum.
Markup
The markup requires two unordered lists wrapped in a div with a class of “verticalslider.” The first list is given a class of “verticalslider_tabs” and contains the text (or images) that appear on the tabs. The second list is given a class of “verticalslider_contents” and contains the contents that appear to the side of the tabs.
1: <div class="verticalslider" id="textExample">
2: <ul class="verticalslider_tabs">
3: <li><a href="#">Lorem Ipsum</a></li>
4: <li><a href="#">Praesent Pulvinar</a></li>
5: <li><a href="#">Nunc Adipiscing</a></li>
6: <li><a href="#">Praesent Dapibus</a></li>
7: </ul>
8: <ul class="verticalslider_contents">
9: <li>
10: <h2>Lorem Ipsum</h2>
11: <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut accumsan placerat bibendum.</p></li>
12: <li>
13: <h2>Praesent Pulvinar</h2>
14: <p>Praesent pulvinar, lorem nec ullamcorper semper, ipsum erat vestibulum lacus, in sodales lorem mi in leo.</p></li>
15: <li>
16: <h2>Nunc Adipiscing</h2>
17: <p>Nunc adipiscing purus id orci rutrum placerat.</p></li>
18: <li>
19: <h2>Praesent Dapibus</h2>
20: <p>Praesent dapibus metus vitae velit blandit tempor.</p></li>
21: </ul>
22: </div>
Includes
To use VerticalTabs you must of course include jQuery, as well as including the single VerticalTabs JavaScript file and the single VerticalTabs css file.
1: <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
2: <script type="text/javascript" src="verticaltabs/js/verticaltabs1.0.pack.js"></script> <!--http://dean.edwards.name/packer/-->
3: <link rel="stylesheet" href="verticaltabs/css/verticaltabs.css" />
Initializing
Simply initialize the plugin as you would any other jQuery plugin.
1: $("#textExample").verticaltabs();
Options
There are only a handful of options available for VerticalTabs detailed below:
- speed – the speed in ms it takes for one content item to fade out and the other fade in
- slideShow – boolean parameter which determines whether or not the contents automatically rotate
- slideShowSpeed – when in slideShowmode, this determines how long VerticalTabs pauses before switching contents
- activeIndex – specifies which tab and its corresponding contents displayed on load
- playPausePos – determines the position of the play/pause button when in slideShow mode (topRight, bottomRight, topLeft, bottomLeft).
- pauseOnHover – true or false option which determines whether the slide show will temporarily pause when the user mouses over the tabs or contents
Additionally, the tabs can float to the right of the content instead of the left by uncommenting the appropriate section in the vertical tabs stylesheet.
*VerticalTabs is inspired by Journal Interactive’s Community Site Content Slider.


ADG says:
December 31, 2011 @ 1:24 pm
When I open up the CSS for right float I lose the arrows. Any hint?
ADG says:
December 31, 2011 @ 1:31 pm
Ignore previous – It was the path. It’s set to “../images” rather than absolute. For those running this OOTB and doing this make sure to change that.
Alex Kuznetsof says:
January 3, 2012 @ 12:24 am
Thank you buddy !!!
Web Design Burgess Hill says:
February 2, 2012 @ 6:13 am
Used this on one of my websites, found it much easier to work with compared to the jQuery UI version!
Thanks.
Jade says:
February 9, 2012 @ 1:22 am
Very simple to implement, thank you.
I was just wondering, is there a way to access a tab directly via a URL? (not land on the default active tab)
Jade says:
February 9, 2012 @ 1:30 am
Just found page 1 of the comments where this has been covered. Will give Shawn’s advice a go. Cheers
Christine says:
March 26, 2012 @ 3:36 pm
Jade, how did you get to the other pages of comments?
Prodyot says:
February 28, 2012 @ 10:15 pm
Wonderful.
It has solved one of my nagging issues.
Thanks for sharing.
Ramiya says:
March 5, 2012 @ 11:30 pm
Thank you so much for sharing it. One doubt, how to set ‘auto’ height in css for the contents.
Ramiya says:
March 5, 2012 @ 11:31 pm
increse the height..
Aashis Khanal says:
March 7, 2012 @ 10:00 am
hi ..
my content are text contents are like 3-4 paragraphs .. it doesn’ fit in above demo .. I couldn’t able to scroll as well.
Is there anyway we can increase the height of the right text container.
I mean the auto height depending on the contents each tab container holds.
Niels says:
March 23, 2012 @ 4:09 am
Hi, I really like your plugin, but with IE7 the content is placed to the far right of the screen. Is this a known issue?
gil says:
April 17, 2012 @ 8:20 am
Try adding margin: 0 0 0 0; padding: 0; position:relative; to .verticalslider_contents . Somehow adding extra 0′s helped me… But yes I had the same issue.
Christine says:
March 26, 2012 @ 3:34 pm
Great plugin! I was wondering if there is a way to activate the change on hover, instead on on click of the tabs?
Thanks!
Crazy Soccer says:
April 24, 2012 @ 2:56 am
It’s Very simple to implement, thank you for sharing with us.
Glenn says:
April 27, 2012 @ 4:16 am
If you remove the follow code from verticaltabs.js it will stop assigning a height to the content area:
$(“.verticalslider_contents li”,verticaltabs).css({height: totalHeight + “px”}); // Assign height to contents to prevent content overflow
Debashis Chowdhury says:
April 27, 2012 @ 5:41 am
Hi,
Thanks for this awesome plugin. I wanted to open a tab while redirecting from other page, but failed to do so. Let me explain my requirement. By default, the first tab is open. On third tab content there is a link of other page. From this page if someone clicks on back button (manually implemented redirection option, not the browser’s back option), i wanted to open the 3rd tab open by default. Tried to put an Id on “” and passing this id using redirection url(www.example.com/page#li_id). But failed to do so. Any suggestion?
Thanks in advance.
Glenn says:
April 30, 2012 @ 10:37 am
I am looking to style one of the active tabs differently from the rest. Change what the active state looks like on the top menu item
Cheers,
Glenn