View Full Version : DD Drop Down Panel State

10-06-2011, 03:50 PM
1) Script Title: DD Drop Down Panel

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/dddropdownpanel.htm

3) Describe problem: Is there a way to have this display in the open state? Thanks.

10-08-2011, 06:11 PM
Sure, try the below modified .js file. It adds a new "dir" option at the very end of the file inside the initialization code you can use to set the initial state of the drop down panel to be visible by default:

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

Remove this option in red to revert the script back to its default contracted state when the page loads.