Accordions can be very useful for showing lots of different sections of data in a small amount of space. jQuery UI has a built in Accordion function, but according to the jQuery UI Build your Download, the size of the Core jQuery UI and Accordion scripts are 25kb and 16.6kb, respectively. Today, I'll show you how to build a custom accordion that is more "bandwidth efficient".
That seems like a lot for just one simple accordion. Especially when you add in the normal jQuery script, which is 18kb minified and Gzipped. So instead of increasing your page load time with the extra unneeded functionality, why not create something from scratch?
I also think that writing things from scratch really gives you a much better understand of how to use jQuery effectively, without always turning to use someone else’s code.
So the plan for this tutorial is to show create an accordion using the jQuery UI function, then create one using some custom coding. Let’s use a blog sidebar as an example.
The Markup
The markup is very simple, just a list item for each section in the accordion:
<ul id="accordion"> <li> <a href="#recent" class="heading">Recent Entries</a> <ul id="recent"> <li><span class="date">01.19.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.15.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.13.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.11.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.10.2009</span> <a href="#">Recent Entry Title</a></li> </ul> </li> <li> <a href="#popular" class="heading">Popular Entries</a> <ul id="popular"> <li><span class="date">08.16.2008</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">06.12.2008</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">04.12.2008</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">06.12.2007</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">03.12.2007</span> <a href="#">Popular Entry Title</a></li> </ul> </li> <li> <a href="#categories" class="heading">Categories</a> <ul id="categories"> <li><a href="#">Category Name</a> <span class="count">7</span></li> <li><a href="#">Category Name</a> <span class="count">4</span></li> <li><a href="#">Category Name</a> <span class="count">15</span></li> <li><a href="#">Category Name</a> <span class="count">29</span></li> <li><a href="#">Category Name</a> <span class="count">8</span></li> </ul> </li> <li> <a href="#archive" class="heading">Archive</a> <ul id="archive"> <li><a href="#">January 2009</a> <span class="count">4</span></li> <li><a href="#">December 2008</a> <span class="count">14</span></li> <li><a href="#">November 2008</a> <span class="count">12</span></li> <li><a href="#">October 2008</a> <span class="count">8</span></li> <li><a href="#">September 2008</a> <span class="count">18</span></li> </ul> </li> </ul>
The CSS
We are going to add some very basic styling so that the accordion looks more presentable. Since this tutorial is mainly focused on the JavaScript, I am going to run through what we are doing with the CSS quickly.
Since I always start from my own simple framework stylesheet, I’m going to use it here too:
/*****Reset*****/
html, body, div, h1, h3, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, blockquote, pre, form, fieldset, table, th, td { margin: 0; padding: 0; }
/*****Basic Definitions*****/
body { background: #fff; color: #333; font: 14px/20px Georgia, "Times New Roman", Times, serif; }
h1 { font-size: 24px; line-height: 30px; margin-bottom: 18px; }
a { }
a:visited { }
a:hover { text-decoration: none; }
img { border: none; }
p, ul, ol, dl, table { margin-bottom: 18px; }
ul, ol, dd { margin-left: 36px; }
/*****Custom Classes*****/
.clearing { clear: both; }
.clearfix { overflow: hidden; }
.last { margin-bottom: 0; }
.screenReader { left: -9999px; position: absolute; top: -9999px; }
Next, I am going to remove the margin and list-style from the accordion unordered list and the descendant lists and add a bottom border to the accordion unordered list (you will see why it is only a bottom border shortly).
ul#accordion, ul#accordion ul { list-style: none; margin: 0; }
ul#accordion { border-bottom: 1px solid #000E2E; }
Then, I am going to add a border around each accordion section, except the bottom border. Also, I am going to remove the border from list items that are descendants of the accordion section and add only a bottom border. If it is the last child of a descendant unordered list, I am going to remove the bottom border. Yes, I know this will not work in IE, but it’s not essential.
ul#accordion li { border: 1px solid #000E2E; border-bottom: none; }
ul#accordion ul li {
border: none;
border-bottom: 1px solid #C2C8D1;
color: #999;
padding: 5px 10px;
}
ul#accordion ul li:last-child { border-bottom: none; }
Next, I am going to style the main link that will toggle the accordion so that they stand out more:
ul#accordion a.heading {
background: #F4FFF9;
color: #999;
display: block;
font-size: 18px;
line-height: 18px;
padding: 10px 5px;
text-decoration: none;
}
ul#accordion a.heading:hover { background: #00B9D2; color: #fff; }
Finally, I am just going to do some basic styling on the sub lists of the accordion so that they look a little nicer:
ul#accordion li ul a { border-bottom: 1px solid #00B9D2; color: #025185; text-decoration: none; }
ul#accordion li ul a:hover { border-bottom: none; }
ul#accordion li ul .date { padding-right: 10px; }
ul#accordion li ul .count { padding-left: 10px; }
Let’s take a look at where we are so far. This is also what the accordion will look like when we are using the jQuery UI Accordion and JavaScript is disabled.
It looks like we will need to add some additional CSS for IE6 to account for the whitespace bug:
ul#accordion { float: left; width: 300px; }
ul#accordion li { float: left; width: 298px; }
ul#accordion a.heading { width: 298px; }
ul#accordion ul li { float: none; width: auto; }
The jQuery UI Accordion
Now that we’ve got all the markup and styling complete, it is very simple to implement the jQuery UI accordion. First, we just need to include jQuery and our jQuery UI script.
<script type="text/javascript" src="scripts/jquery.js"></script> <script type="text/javascript" src="scripts/jquery-ui-accordion.js"></script>
Then, we need to initialize the accordion on our unordered list with an id of accordion:
<script type="text/javascript">
$(document).ready(function() {
$('#accordion').accordion();
});
</script>
And there you have it, a working accordion.
To make the currently open accordion item stand out more, I added a little extra CSS:
ul#accordion li.ui-accordion-selected a.heading { background: #025185; color: #fff; }
The class name of ui-accordion-selected is automatically added to the current accordion section.
Our Custom jQuery Accordion
Now that we have done the jQuery UI accordion, it’s time to create our own. One thing that I don’t necessarily like about the jQuery UI version is the way it displays when JavaScript is disabled. I would prefer to have it so that only one section is open at a time.
To accomplish this, I am going to add in a little PHP. You could easily accomplish this with any programming language as well.
The idea behind this is that we are going to pass a variable in the URL, and if the variable coincides with each section, we assign a class of current to that section. It is much easier to see this in code, so have a look:
<?php $section = $_GET['section']; ?> <ul id="accordion"> <li<?php if($section == '' || $section == 'recent'): ?> class="current"<?php endif; ?>> <a href="?section=recent" class="heading">Recent Entries</a> <ul id="recent"> <li><span class="date">01.19.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.15.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.13.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.11.2009</span> <a href="#">Recent Entry Title</a></li> <li><span class="date">01.10.2009</span> <a href="#">Recent Entry Title</a></li> </ul> </li> <li<?php if($section == 'popular'): ?> class="current"<?php endif; ?>> <a href="?section=popular" class="heading">Popular Entries</a> <ul id="popular"> <li><span class="date">08.16.2008</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">06.12.2008</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">04.12.2008</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">06.12.2007</span> <a href="#">Popular Entry Title</a></li> <li><span class="date">03.12.2007</span> <a href="#">Popular Entry Title</a></li> </ul> </li> <li<?php if($section == 'categories'): ?> class="current"<?php endif; ?>> <a href="?section=categories" class="heading">Categories</a> <ul id="categories"> <li><a href="#">Category Name</a> <span class="count">7</span></li> <li><a href="#">Category Name</a> <span class="count">4</span></li> <li><a href="#">Category Name</a> <span class="count">15</span></li> <li><a href="#">Category Name</a> <span class="count">29</span></li> <li><a href="#">Category Name</a> <span class="count">8</span></li> </ul> </li> <li<?php if($section == 'archive'): ?> class="current"<?php endif; ?>> <a href="?section=archive" class="heading">Archive</a> <ul id="archive"> <li><a href="#">January 2009</a> <span class="count">4</span></li> <li><a href="#">December 2008</a> <span class="count">14</span></li> <li><a href="#">November 2008</a> <span class="count">12</span></li> <li><a href="#">October 2008</a> <span class="count">8</span></li> <li><a href="#">September 2008</a> <span class="count">18</span></li> </ul> </li> </ul>
You should also notice that I changed the url of each of the links the toggle the accordion sections to match up with the if statement for the section. So basically, if JavaScript is disabled, you will be taken to a new page with that section open.
We also need to remove the jQuery UI accordion script, and include our own:
<script type="text/javascript" src="scripts/accordion.js"></script>
Additional CSS
With this slight change to the markup, we need to add in a little additional CSS. We no longer have the ui-accordion-selected class being assigned to the list items; it is now a class of current. We also have to account for this class name change in the on state for the accordion:
ul#accordion li.current a.heading { background: #025185; color: #fff; }
So what we want to do is hide all of the unordered lists, unless they are a descendant of the list item with a class of current. I have also added a body id to this demo page so that we can use the same stylesheet for both examples.
body#customAccordion ul#accordion li ul { display: none; }
body#customAccordion ul#accordion li.current ul { display: block; }
The Custom JavaScript
First, we want to execute the script once the document is loaded, so we start with this:
$(document).ready(function() {
});
We want the accordion to function when the heading links are clicked, but we don’t want to leave the page so we need to make sure and return false:
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
return false;
});
});
Next, I don’t like the outline that shows up around the links when they are clicked, so I set that to none:
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
$(this).css('outline','none');
return false;
});
});
There are two different cases for this script.
- The link being clicked is the section that is already open.
- The link being clicked is not the section that is already open.
The First Case
This is not functionality that the jQuery UI version has, but I think a user should be able to close all sections if they want. If the link clicked has a parent that has a class of current, we want to slide up the unordered list and remove the class of current.
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
$(this).css('outline','none');
if($(this).parent().hasClass('current')) {
$(this).siblings('ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
});
}
return false;
});
});
Another thing that bugs me about the jQuery UI version, is that you can scroll the accordion so it is almost out of view, click it, and then the interaction happens above what you can see. Scroll down on the jQuery UI example and give it a try.
So my solution is to use this wonderful little script called jQuery ScrollTo. It is a very small script that adds smooth page scrolling.
Let’s add that to the head of the document before our accordion script:
<script type="text/javascript" src="scripts/jquery.js"></script> <script type="text/javascript" src="scripts/jquery-scrollTo.js"></script> <script type="text/javascript" src="scripts/accordion.js"></script>
When the section scrolls up, I want to scroll the window to the top of the accordion:
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
$(this).css('outline','none');
if($(this).parent().hasClass('current')) {
$(this).siblings('ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
$.scrollTo('#accordion',1000);
});
}
return false;
});
});
The first parameter of the function is the target to scroll to, and the second is the amount of time it should take.
The Second Case
This case occurs when the section that is clicking is not currently open. So the first thing we want to do is hide the currently open section and remove the class of current (this piece of the code is very similar to the first case):
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
$(this).css('outline','none');
if($(this).parent().hasClass('current')) {
$(this).siblings('ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
$.scrollTo('#accordion',1000);
});
} else {
$('ul#accordion li.current ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
});
}
return false;
});
});
Next, we want to open the section we clicked and add the class of current:
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
$(this).css('outline','none');
if($(this).parent().hasClass('current')) {
$(this).siblings('ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
$.scrollTo('#accordion',1000);
});
} else {
$('ul#accordion li.current ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
});
$(this).siblings('ul').slideToggle('slow',function() {
$(this).parent().toggleClass('current');
});
}
return false;
});
});
Finally, let’s scroll the window to the top of the accordion, just like we did in the first case:
$(document).ready(function() {
$('ul#accordion a.heading').click(function() {
$(this).css('outline','none');
if($(this).parent().hasClass('current')) {
$(this).siblings('ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
$.scrollTo('#accordion',1000);
});
} else {
$('ul#accordion li.current ul').slideUp('slow',function() {
$(this).parent().removeClass('current');
});
$(this).siblings('ul').slideToggle('slow',function() {
$(this).parent().toggleClass('current');
});
$.scrollTo('#accordion',1000);
}
return false;
});
});
Take a look at our custom jQuery accordion.
That’s it. Seriously. Did you think creating an accordion could be that simple?
Conclusion
Now, let’s compare the JavaScript file sizes using the Net tab in Firebug.
In the jQuery UI example, the JavaScript files total about 73 kb. In our custom example, with the additional scrolling of the window, the JavaScript files total about 57 kb. Now, that may not seem like much, but imagine if you have a very high traffic site. That could be a lot of bytes saved. Plus, now you understand more about jQuery.
Now go out and write your own jQuery.
- Subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.
Related Posts
Check out some more great tutorials and articles that you might like
Plus Members
Source Files, Bonus Tutorials and
More for $9 a month for all TUTS+
sites in one subscription.













User Comments
( ADD YOURS )Andy Gongea January 21st
Well done Travis. I used a custom one without jQuery but I think I will try and switch to your approach. Thanks for this good tutorial
( )Timothy January 21st
Not bad. Would like to see some similar walk-throughs for either MooTools or Prototype.
( )insic January 21st
This accordion is awesome. nice work Travis.
( )Joe T P January 21st
The demo takes about 3 to 4 years to load.. And it’s spelled accordion not “accordian”.. Otherwise, good job..
( )EvilRobot April 9th
Of course if you were correcting in ‘English’ and not ‘American-English’ it would be ‘Spelt’… NOT ’spelled’ which is technically incorrect
Far be it for me to point out an error like you have chosen too (or is it chosed?). Maybe if you are going to correct people you should make sure you are using proper and correct spolling yourself.
Otherwise, good job..
Can you spot the error(s)?
( )Youssef January 21st
yes good
( )OpenSourceHunter January 21st
Very nice, i really like tuts about jQuery so hope to see more
greetz
( )http://www.opensourcehunter.com/2009/01/15/two-ebooks-give-away-at-opensourcehunter/
Brenelz January 21st
very nice. Like how you showed the custom way and then exapanded the jQuery way.
-Brenelz
( )http://www.brenelz.com
Jash Sayani January 21st
Nice Tutorial !
But when you select a category, the whole page scrolls. How do you disable that?
( )DKumar M. January 21st
Nice one Trevor…. I just read another accordion based article on other well known blog…. I’m a great fan of JQuery since very long. Thanks for the Article.
( )Vasily January 21st
Very cool, much appreciated.
( )There a few broken links through out the article, please check.
bruce January 21st
a few ‘‘ s in the posted javascript, might want to remove those or people might get confused
( )bruce January 21st
try that again … there are a few <strong> tags in the javascript above
( )Nate January 21st
Wow, that seems seriously useful.
- Nate
( )Moksha Solutions January 21st
nice to see something of jquery. thanks
someone please help me, i am looking for some jquery simple horizontal menu.
( )Brian Crescimanno January 21st
@Timothy:
I wrote a tutorial on creating an accordion using Prototype on this site a few months ago; you can find it here:
http://nettuts.com/tutorials/javascript-ajax/create-a-simple-intelligent-accordion-effect-using-prototype-and-scriptaculous/
( )Dave January 21st
Love the Jquery Tuts, MORE MORE MORE ……….MMMMMOORRE
( )Josh January 21st
i rather use this 2k accordion:
( )http://www.leigeber.com/2008/10/animated-javascript-accordion/
Volkan Tokmak January 21st
good work mate. I always read your tuts, really helpful. thx a lot.
( )arshad January 21st
That was a great article.Thanks a lot .keep up the great work : )
( )Nokadota January 21st
I need to optimize my portfolio for accessibility and this was exactly what I needed. Thanks a lot.
( )Gaurav M January 21st
accordy nice nicy nice accordy
( )Shane January 22nd
Solid tutorial. Thanks for writing it.
( )ThaClown January 22nd
Whow, that is soo nice!
( )I was using a ‘ready made’ accordion but I now kan figure out exactly how it works and controll it! Thank you!
SiGa January 22nd
Very helpful tutorial with comprehensive information – many thanks for that one!
( )Robert January 23rd
I would set the position: absolute; and use a wrapping div via query.. but that’s just me, should also start the animation from gray > blue by changing class and putting a fade on it…
( )Robert January 23rd
Also I would set display: none; on the content within the accordion which will keep it from “lagging” since it lags pretty bad, since it’s moving ’s within a content…
( )Taylor Satula January 24th
little lag in google chrome, but besides that it is a really good tut
( )Jörn Zaefferer January 25th
The jQuery UI accordion has support for keyboard navigation and applies appripiate ARIA attributes for furtheraccessibility, among other features like the navigation option.
Alternatives are nice when you really don’t need that, but you should at least mention where the difference in filesize is coming from.
( )Jason January 26th
Not bad, but I don’t really like some of the unnecessary scrolling. Also, this should be made into more of a plugin form. If the id of “#accordian” changes, you’ll have to go through the code and change every reference. Same goes for speed settings- not easily customized.
Please see guidelines for writing jQuery plugins:
( )http://docs.jquery.com/Plugins/Authoring
Nanonano January 26th
I like it, but I think there is a bug in it.
If you collapse all the the panels and then click “Popular Entries” and “Recent Entries” fast after each other, you are able to open 2 panels at the same time.
(it’s even to open 3 at the same time)
( )tutorialand January 28th
Nice tutorial
What is the trackback url?
Click my nick!
( )ricygreargo January 28th
Virtual Private Servers are also more secure since even as you share the memory and CPU time, you are allocated your own file system.
( )notebok dell
Laptop asus
FM January 30th
HELP
imagine that i have a button on the footer is it possible to make it slide up as a drop down menu but instead going down it would be going up, displaying its insides options?????
ty
( )Mike Gifford February 4th
There are accessibility issues with using CSS with display:none;
See the following post:
http://juicystudio.com/article/screen-readers-display-none.php
Any way to produce accordion type interfaces without it?
( )Adam February 5th
Nice!!
( )cosinus February 7th
How can I have a Jquery Accodrion with 3 levels and when I clic on one link , it changes color (to know what link is active now) I tried many scripts but no success !!!
( )Mel February 7th
Nice tute… but I am trying to get it working with jquery.ui-1.5.3 stable version but i am not getting anywhere near getting it right.
I had this on my and this doesn’t work:
Do you know a workaround?
( )Josh February 11th
Great tutorial…
However, I am wondering if there is a way to eliminate the bug that Nanonano mentioned (being able to expand multiple categories at once if you quickly click multiple categories)?
Basically is there a way I can set it so only one “tab” can be open at a time?
Thanks!
( )Jozhn McKaroly February 16th
The height of the accordion element depents on the height of the highest accordion element, so if in the first element i have 1 line of text, and in the second i have 15 lines of text, the first element will be the size of the second one. Don’t think that’s a feature…
( )Patrick Quirke February 17th
Is there a way of linking from another page to a section of the accordion so when the accordion page appears it opens up the relevant section.
E.g I used the accordion for an FAQs page and on a different page i am referencing one of the FAQ questions but the question is about numer 6 of 20 questions and i cant reference that question to open up when the FAQs page loads up.
( )Ryan March 15th
Im still confused…
( )arman adhitama March 27th
Nice tuts here
( )Graeme Lambert April 14th
When I click on a link in the list it doesn’t actually go to the link specified, it just closes the menu?
( )Ollie April 15th
hi,
great tutorial.
how can i start with all of them closed?
Thanks.
Ollie
( )Zoran July 14th
Thanks, for this, but there is bug in it… Once you click and open up some category, then click on one of the links.. and then go back and click other category the accordian gets stuck and it looks pretty ugly… but thank you very much for your try, i will have a look at it and will try to fix the bug… It’s good you taken us so far, so we have to do something on our own too.. Thanks for the tutorial
( )Ce. August 2nd
Hai gais this isn’t how to create a custom jquery accordion… this is EXACTLY how to create a custom jquery accordion. duh…
( )sylvain August 18th
Hi all,
i’m trying to use this accordion menu as a way to display content. I’m using the title to display each div but would like to also have a menu which would open these div.
see example : http://loiseau.sylvain.free.fr/perso/CK/KC/05_pagefille_type2c.htm
I already coded:
$(document).ready(function() {
$(”.rightMenuContent li”).click(function(){
$(”.rightMenuContent li”).removeClass(”selected”);
$(”.rightMenuContent li”).addClass(”unselected”);
$(this).removeClass(”unselected”);
$(this).addClass(”selected”);
getIdMenu(this);
});
function getIdMenu(x){
var idMenu;
idMenu = $(x).attr(”id”);
// insert here code to activate targetted div //
}
});
Any idea?
thank in advance
( )sylvain
Omar August 30th
Great work – How can I use this in a Google Site ?
( )sacred September 15th
good job.
( )Comments September 15th
Nice collection..
( )santiago September 16th
Good stuff, thank you Travis
( )Brian Nelson September 17th
I love the accordion thanks for your hard work…I have added to my website, but I am just having a little trouble with one thing. When you click say “Academic Programs” and the accordion slides down and then you choose “Advertising” and when the “Advertising” page loads the accordion slides down once again once I’m on the newly loaded “Advertising” page. How can I keep the accordion already open without it sliding down when it is on the selected page?
http://www.unf.edu/~n00181631/adv_web/project02/index.html
Thanks for the help,
Brian
( )Brian Nelson September 17th
P.S. Here is the Javascript for the “Academic Programs” nav and pages.
/* ACADEMIC PROGRAMGS */
$(document).ready(function() {
$(’ul#accordion a.academic’).click(function() {
$(this).css(’outline’,'none’);
if($(this).parent().hasClass(’current’)) {
$(this).siblings(’ul’).slideUp(’slow’,function() {
$(this).parent().removeClass(’current’);
});
} else {
$(’ul#accordion li.current ul’).slideUp(’slow’,function() {
$(this).parent().removeClass(’current’);
});
$(this).siblings(’ul’).slideToggle(’slow’,function() {
$(this).parent().toggleClass(’current’);
});
}
return false;
});
});
$(document).ready(function() {
$(’ul#accordion a.academic-selected’).show(function() {
$(this).css(’outline’,'none’);
if($(this).parent().hasClass(’current’)) {
$(this).siblings(’ul’).slideUp(’slow’,function() {
$(this).parent().removeClass(’current’);
});
} else {
$(’ul#accordion li.current ul’).slideUp(’slow’,function() {
$(this).parent().removeClass(’current’);
});
$(this).siblings(’ul’).slideToggle(’slow’,function() {
$(this).parent().toggleClass(’current’);
});
}
return false;
});
});
$(document).ready(function() {
$(’ul#accordion a.academic-selected’).click(function() {
$(this).css(’outline’,'none’);
if($(this).parent().hasClass(’current’)) {
$(this).siblings(’ul’).slideUp(’slow’,function() {
$(this).parent().removeClass(’current’);
});
} else {
$(’ul#accordion li.current ul’).slideUp(’slow’,function() {
$(this).parent().removeClass(’current’);
});
$(this).siblings(’ul’).slideToggle(’slow’,function() {
$(this).parent().toggleClass(’current’);
});
}
return false;
});
});
Thanks again!
( )Joe October 11th
These always seem to come in useful !
( )carlos October 12th
Gracias por la informacion esta muy buena
( )Scott @sydneydesign November 12th
Hi Great post thanks for the info. i’m using it and its easy to setup.
( )