A couple of things you should do:
1) First, inside dddropdownpanel.js, you should add the code in red to the following code block:
Code:
//initialize instance of DD Drop Down Panel:
var defaultpanel=new ddpanel({
ids: ["mypanel", "mypanelcontent", "mypaneltab"], // 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: 10}, //steps: number of animation steps. Int between 1-20. Smaller=faster.
pointerimage: {enabled: false, 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?
})
//initialize instance of DD Drop Down Panel:
var defaultpanel2=new ddpanel({
ids: ["mypanel02", "mypanelcontent02", "mypaneltab02"], // 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: 10}, //steps: number of animation steps. Int between 1-20. Smaller=faster.
pointerimage: {enabled: false, 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?
})
In other words, the variable for the 2nd instance of your drop down panel should be unique compared to the first- so in this case, I renamed it to "defaultpanel2" instead.
2) Then, on your page, you should also remove the following code block, as it's redundant and in fact references a non existing file:
Code:
<script type="text/javascript" src="dddropdownpanel02.js">
/***********************************************
* DD Drop Down Panel- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
Bookmarks