Feb 28, 2011

Create Tabbed HTML using JQuery - $.TABIFY

Description:
It is very easy to use Tabify. All you need to do is to create an ul-list, fill it with a couple of li-elements with containing links (tabs) and create a couple of matching content divs. In the example below notice how the href-attribute on the link elements corresponds to the content div IDs.



Usage:
$('ul').tabify();
<ul id="menu">
<li class="active"><a href="#contentHome">Home</a></li>
<li><a href="#contentGuestbook">Guestbook</a></li>
<li><a href="#contentLinks">Links</a></li>
</ul>
<div id="contentHome">Content for Home</div>
<div id="contentGuestbook">My guestbook</div>
<div id="contentLinks">Links</div></pre>
// All divs but #contentHome will be hidden since the menu option 'Home' has the class name 'active.
VIEW DEMO
DOWNLOAD

No comments:

Post a Comment

Test post after a long time

i want to see the post