Accordion Script Problems
1) Script Title: Accordion Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...enu-bullet.htm
3) Describe problem:
My real issue isn't so much with the script rather than a question of its limitation. As the script is, the menus are set up as headers, and do not display content unless some form of printable text is entered into the header tags. I fixed this problem easily enough by converting the headers into DIVs, because I wanted to use images (while maintaining the CSS that the only images used are backgrounds).
So my problem is this: since the script is made to work assuming all headers require the same styles, how would you make it so that each individual header gets it own toggled class? To put it simply, I have two images for one button (a simple mouseover) but I want this to happen for each different header.
I would like to make two separate classes for each button saying that one class is how it should be collapsed, and the other is how it should be expanded, similar to how in the example .openheader compliments .menuheader.
The issue is that if I'm using different images for each button (which with my layout it is a must), I'm forced to make separate classes for each state of every button as well. Though I'm not fluent enough in javascript to know how to tell it associate one class with another. I know it has something to do with the toggleclass function, though this script only comes pre-written with that one instance of the toggleclass (menuheader and the corresponding openheader).
How do I make multiple classes toggle over to other classes?
Thanks
EDIT: If I didn't explain this very well, I suppose that the accordion script is irrelevant. Toggleclass is used once in the script given, but I need a toggleclass function for each and every button since they all with have different classes. If there is a simple way to do that, then I'm all for it. I really just needed a way to incorporate "click-activated" rollovers that didn't interfere with the consistency of the Accordion script.
(Oh, and sorry for the wall of text.)