To initialize an accordion use the following code:
var mySlider=new accordion.slider(“mySlider”);
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.