View Full Version : Animated Collapsible DIV

03-03-2009, 01:00 PM

I have just started to integrate the Animated Collapsible DIV (http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm) onto a web page.

I want to have a single 'show/hide' button, with several DIV's being hidden/shown at the same time.

At the moment I have set it up so I have several DIV's. such as:

<div id="jason"><p>hello, my name is grant</p></div>

<div id="jason"><p>how are you?</p></div>

<div id="jason><p>goodbye</p></div>

With one hide/show button at the top of the page. When I click 'hide/show', only the very first div hides/shows, the other two do not hide or show.

I wondered if it is possible to amend the script so that all of the same div id's will action at the same time so that I can expand/collapse all of the <div>'s using one single button.

I don't mind paying for somebody to edit the script to do so, but would appreciate if someone could advise on a solution.


03-03-2009, 08:53 PM
Can't you just give each DIV a unique ID, then show/hide them together using something like:

animatedcollapse.show(['jason', 'kelly', 'michael']) //show all 3 DIVs?

Technically the unique ID attribute should be just that, unique in its value on the page. Giving multiple DIVs the same ID can create problems, some unforeseen.