Tabify – Tabbed content with ease (jQuery plugin)
This Jquery plugin lets you easily create tabbed content. All you need is an ul-element with some li-elements and a couple of related content-divs. The major difference between Tabify and it’s competitors is it’s size.
How to use Tabify
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.
<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>
When you have created the necessary html code you need to include the javascript file with the plugin and call the tabify method.
$('ul').tabify();
| Version | Changes |
|---|---|
| 1.4 | Fixed an issue where a malformed hash would make Tabify crash. |
| 1.3 | Fixed an issue causing the page to jump when you clicked on the tabs |
Accordion – Super simple javascript accordion jQuery plugin
This Jquery plugin makes creating accordions pain free. Just create an ul list and call the accordion javascript method and it is all done! Also it is super lightweight, just around 0.5kb. This Accordion script sets no limit for the depth of your accordion. You can make it as many level as you want.
This Jquery plugin makes creating accordions pain free. Just create an ul list and call the accordion javascript method and it is all done! Also it is super lightweight, just around 0.5kb. This Accordion script sets no limit for the depth of your accordion. You can make it as many level as you want.
How to use Accordion
It is very easy to use Accordion. All you need to do is to create an ul-list, fill it with a couple of li-elements and div-elements for the content; In the example below if you click on New York the div element containing Information about New York will show.
<ul>
<li>
<a href="#america">America</a>
<ul>
<li>
<a href="#america-newyork">New York</a>
<div>Information about New York</div>
</li>
<li>
<a href="#america-sanfransisco">San Fransisco</a>
<div>Information about San Fransisco</div>
</li>
</ul>
</li>
<li>
<a href="#antarctica">Antarctica</a>
<div>Information about Antarctica</div>
</li>
</ul>
When you have created the necessary html code you need to include the javascript file with the plugin and call the accordion method. See the demo for a more detailed example.
$('ul').accordion();
Linking to a level inside the accordion
Notice the href-attributes on each a-element. If you in the html code example above create a link to #america-newyork and click it the accordion will open up ‘New York’ and all it’s parents.
Open a panel on load
Set the li classname to “current” and it will be open when the page loads.
| Version | Changes |
|---|---|
| 1.3 | Refactored code and fix a bug with images inside a tags |
| 1.2.2 | Added functionality to open a panel on load by specifying the li class to “current”. |
| 1.2.1 | Fixed an error that occurred when no hash was set. |
| 1.2 | It is now possible to link to a specific level using a hash |
| 1.1 | Fixed an issue causing the accordion to stop working if you applied the accordion method twice on the same element. |
Projects
- Accordion (jQuery)
- Airport (jQuery)
- Defaultvalue (jQuery)
- Elastic (jQuery)
- Highlight (jQuery)
- Keycan
- Lazy (jQuery)
- Limit (jQuery)
- Password Strength (jQuery)
- Show Password (jQuery)
- Tabify (jQuery)
- Valid8 (jQuery)
Latest posts
- July 8th, 2009 Why are we typing passwords twice?
- July 5th, 2009 Don’t stop password masking; let the user decide
- June 1st, 2009 You can’t validate email addresses with regular expressions
- May 20th, 2009 Konami Code: Why so verbose, when you can make it in 140 characters?
- May 18th, 2009 Let your users know if Firebug slows down your web page.