You can get all the DIVs to close except the one you're expanding by grouping them together when initializing the script, for example:
Code:
animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')
animatedcollapse.addDiv('dog', 'fade=0,speed=400,group=pets,persist=1,hide=1')
animatedcollapse.addDiv('rabbit', 'fade=0,speed=400,group=pets,hide=1')
Notice the code in red above- to group certain DIVs together so only one is expanded and the rest contracted during user interaction, give each of the DIVs a common group name, such as group=pet or group=mycontent etc.
On the DD demo page, this is shown in Demo #4, 5, and 6.
Bookmarks