A fellow named Klaus has created a nifty little plugin that creates accessible unobtrusive javascript tabs using jQuery.
With the correct (x)HTML and CSS you can create tabs as easily as
$.tabs("container"); // first tab on by default
If you want to have the second tab “on” by default:
$.tabs("container", 2); // second tab on
Klaus has an example that you can view to see the end result.
I had to do something to add to Klaus’ contribution so I came up with a simple form that you can use to generate the markup for the tabs.
Instructions:
It’s very simple. Just type a name for each tab (up to 5) and click the button at the bottom of the form. The next page will generate the html you can copy and paste into your file.
You will also need to download the CSS from Klaus’ site, modify it as you see fit, and of course upload the jQuery javascript library to your server.
Here is the link for the tab markup generator.
Enjoy.
42 Responses
Klaus Hartl
June 27th, 2006 at 11:24 am
1Thank you Jack, this is very neat!
I just wanted to mention that I have revised the plugin lately so that it conforms to the proposed jQuery plugin construct.
This means that the syntax slightly changed:
$('#container').tabs();This also means that one can now use jQuery’s capability to find elements in the DOM tree (and need not to rely on an id) and also chain methods.
Jack
June 27th, 2006 at 12:02 pm
2Klaus,
Glad you stopped by!
I’ll work up an update to my xhtml generator and post it soon.
Olle Jonsson
July 20th, 2006 at 11:34 am
3Not to be farting at the party, but when I tried to enter the first tab, I wanted to use my name.
I mistyped “oööe” (O’s with two dots, instead of L’s in the middle), and the script was unable to find the tab named so. Crazy/Scandinavian characters in the tab names are thus out of the question here.
(Using WinXP, Firefox.)
denny
September 29th, 2007 at 12:58 pm
4how can i fetch different rss feed on each tabs??
tia
37+ Great Ajax, CSS Tab-Based Interfaces
February 21st, 2008 at 10:40 am
5[...] 15daysofjquery- jQuery Tabs A simple form that you can use to generate the markup for the [...]
Recursos y Tutoriales » Blog Archive » Menus basados en Css y Ajax muy buenos
February 22nd, 2008 at 7:30 am
6[...] 15daysofjquery- jQuery Tabs A simple form that you can use to generate the markup for the [...]
fishilonely
April 11th, 2008 at 3:42 pm
7Looks amazing. BTW,Do you have mouse move over TAB?
Jonah Dempcy
April 23rd, 2008 at 8:23 pm
8My colleague Alex wrote his version of jQuery tabs. It’s online at this address:
http://www.thetruetribe.com/2008/04/how-do-i-make-tabs-in-jquery-without-jq.html
Check it out and let me know what you think!
Thomas Godoj
June 2nd, 2008 at 8:08 am
9Thanks.. nice Tabs
37个Ajaxå’ŒCSS实现的Tab选项å¡åˆ‡æ¢æ•ˆæžœç•Œé¢ | CodeLog
June 6th, 2008 at 3:53 am
10[...] 15daysofjquery- jQuery Tabs [...]
基于AJAX,CSSçš„TABæ’ä»¶ - Jun Blog
July 17th, 2008 at 7:29 am
11[...] 18) 15daysofjquery- jQuery Tabs [...]
37个Ajaxå’ŒCSS实现的Tab选项å¡åˆ‡æ¢æ•ˆæžœç•Œé¢ | Primus
August 1st, 2008 at 10:06 pm
12[...] 15daysofjquery- jQuery Tabs [...]
“The Complete Guide” for jQuery Developer- Reblog « Dynamic Disruption
August 18th, 2008 at 10:44 pm
13[...] Accessible Unobtrusive Javascript TabsAccessible Javascript tabs with a tool to create XHTML. [...]
mo
August 20th, 2008 at 6:49 pm
14hello can you please provide the whole application with php files thats a great tool
Mircea Soaica
December 8th, 2008 at 3:09 pm
15a new tabs plugin for jquery. very simple : http://mirceasoaica.com/simple-tabs-plugin-for-jquery/
37+ Great Ajax, CSS Tab-Based Interfaces | SoftSeek!
January 4th, 2009 at 9:19 am
16[...] 15daysofjquery- jQuery Tabs A simple form that you can use to generate the markup for the [...]
kamran ali
January 28th, 2009 at 6:00 am
17jquery is amazing
how can i use jquery tabs in menues
Andres
May 20th, 2009 at 3:34 am
18This dosent work if you have a png file as a background.. …
mohammed
June 4th, 2009 at 7:27 am
19hello can you please post the form code that could generate tabs like your example
zxf
June 9th, 2009 at 3:42 am
20??
Darren Taylor
June 9th, 2009 at 12:28 pm
21I’m using this on a site and its great but I want to add tabs to another part of the same page, tabs that are styled differently. Do you have any examples of this?
30?????ajax?css?tab??? | Linux/Solaris Focus
July 3rd, 2009 at 6:16 am
22[...] 15daysofjquery- jQuery Tabs [...]
Winner
July 9th, 2009 at 3:53 pm
23???? ??? ?????? ??????? ??, ?? ???????? ? ?????????????
37?Ajax?CSS???Tab????????? « liwad
July 11th, 2009 at 9:48 am
24[...] 15daysofjquery- jquery tabs [...]
mark
August 6th, 2009 at 7:15 am
25hi if i want the border from hole the table then wht can i do ?
37+ Great Ajax, CSS Tab-Based Interfaces | YABIBO.COM - YOUR WEB WORLD
August 12th, 2009 at 8:01 am
26[...] 15daysofjquery- jQuery Tabs A simple form that you can use to generate the markup for the [...]
????
August 17th, 2009 at 3:10 pm
27??… ???-?? ? ???? ?????? ?? ???????????, ??????? ???????. ??? ? ???? ???, ??? ?????? ? ?????
50+ CSS Tab-Based Navigation Scripts - Online News & Entertainment
October 5th, 2009 at 6:34 am
28[...] 15daysofjquery- jQuery Tabs A simple form that you can use to generate the markup for the [...]
37+ Great Ajax, CSS Tab-Based Interfaces – Tasar?mc?lar için | Gazetem Sanat
October 18th, 2009 at 3:49 pm
29[...] 18) 15daysofjquery- jQuery Tabs [...]
free style
November 13th, 2009 at 12:15 am
30cool tabs !
RIA Worlds » Tab????????? ??????????
December 7th, 2009 at 4:19 am
31[...] 15daysofjquery- jQuery Tabs [...]
indialike.com
December 9th, 2009 at 9:27 am
32This is really very good Site… Thanks
Andrea Fiori
February 2nd, 2010 at 8:46 am
33Good script. But I use another solution based on css \ jquery only!
Gold
February 17th, 2010 at 6:10 pm
34Thanks for this - will give it a go and see what it looks like.
anil
February 20th, 2010 at 5:28 am
35website kyun banai Apne?
Kush hai he nahin Andar
37?Ajax?CSS???Tab????????? - IETester
March 15th, 2010 at 8:13 pm
36[...] 15daysofjquery- jQuery Tabs [...]
Prashant Renge
April 26th, 2010 at 5:26 am
37thanks ! you made jquery very simple.
I’m using this on a site and its great but I want to add tabs to another part of the same page, tabs that are styled differently.
30+JavaScript Tab??????? | LAMP????
May 8th, 2010 at 1:10 am
38[...] 15daysofjquery- jQuery Tabs [...]
12 Amazing jQuery Tabbed Interface Plugins and Tutorials « Defonic International Solutions
May 9th, 2010 at 4:30 am
39[...] 6. jQuery Tabs [...]
14 Ways To Start Learning jQuery | Tweeaks Design
May 16th, 2010 at 10:18 am
40[...] Create jQuery Tabs [...]
amitkosti.name
July 11th, 2010 at 8:23 am
41[...] 18) 15daysofjquery- jQuery Tabs A simple form that you can use to generate the markup for the tabs. [...]
blogregator
July 24th, 2010 at 10:01 am
42Good tutorial! Thanks!
RSS feed for comments on this post · TrackBack URI
Leave a reply
Categories
Archives
Links
15 Days Of jQuery is proudly powered by WordPress - BloggingPro theme by: Design Disease