Developed by Michael Leigeber; Animated JavaScript Accordion requires no additional frame work or library to work and is only 1.35 KB in size. This script has been tested to work in Firefox 2/3, Internet Explorer 6/7/8, Opera, Safari and Chrome.

To add this accordion in a web page, you need to include JavaScript & CSS files; create a definition list (which will contain content for your accordion panels); and finally instantiate and initialize the accordion object.
To initialize an accordion use the following code:
var mySlider=new accordion.slider(“mySlider”);
mySlider.init(“slider”,0,”open”);
You must create a new accordion object before initialization. The parameter taken by accordion.slider is the variable name used for the object. The object.init function takes 3 parameters: the id of the “dl”, the index of the initially expanded section (optional) and the class for the active header (optional).
You can find further information, demo & download on Michael Leigeber’s Web Development Blog.



