View Full Version : DD Drop Down Panel Question

02-02-2010, 08:31 PM
DD Drop Down Panel

Using the script below and changing out those three IDs in the HTML, I can create multiple dropdowns on a page. Is it possible to modify the code so that the dropdowns interact with each other in that every time you click to open one menu, the others close? That way at least one of the menus is open at all times? Thanks in advance....

<script type="text/javascript">

var testpanel=new ddpanel({
ids: ["mypanel2", "mypanelcontent2", "mypaneltab2"], // id of main panel DIV, content DIV, and tab DIV
stateconfig: {initial: "0px", persiststate: true}, // initial: initial reveal amount in pixels (ie: 5px)
animate: {enabled: true, steps: 15}, //steps: number of animation steps. Int between 1-20. Smaller=faster.
pointerimage: {enabled: true, src: ["images/arrow-down.gif", "images/arrow-up.gif"]},
closepanelonclick: {enabled: true} // close panel when links or elements with CSS class="closepanel" within container is clicked on?


02-03-2010, 08:12 PM
Hmm there's no easy way to do this with this script unfortunately. The closest thing would be Animated Collapsible DIV (http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm), which supports a grouping feature. When one DIV within the group is expanded, the other is automatically closed.

02-03-2010, 10:41 PM
Yep, found that one earlier this morning and have been working with it. I've got it up and running the way I want except for that validation issue which you're helping me out with in the other thread. Thanks much!