I am working with this script: http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm. The only problem is I am new to scripting in any language and the javascript they show works for 3 categories and I havent figured out how to add more categories that will expand yet. Every time I try to add an expandable category it winds up as part of the third sample category and will not work independently. Anyone know how to modify it to add numerous other top level categories?
Adding new categories is explained on the same page under the More information header. You just need to use unique identifiers for the DIVs. Here's an example: <h3 onClick="expandcontent(this, '[COLOR="Red"]sc4[/COLOR]')" style="cursor:hand; cursor:pointer"><span class="showstate"></span>Test</h3> <div id="[COLOR="Red"]sc4[/COLOR]" class="switchcontent"> Test text </div> Code (markup): In this example the identifier is sc4. It can be anything you want, but it must be unique for the script to work correctly.