After Step 2 on the demo page there's a section titled:
Set up Information
It shows the code from inside the dddropdownpanel.js file. Using a text only editor like NotePad, open the file and go to the bottom, that's where this set up information is located. It probably already has an initial of 5px with persistence true:
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: "5px", persiststate: true}, // 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: false} // close panel when links or elements with CSS class="closepanel" within container is clicked on?
})
That means if you close the panel, refresh the page, or leave and come back, it will still be closed. It also means that the first time you go to the page, it should be closed. But it also means if you leave it open and come back later or refresh, it will still be open.
If you want it to always be closed on page load, set the persiststate to false:
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: "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: false} // close panel when links or elements with CSS class="closepanel" within container is clicked on?
})
Bookmarks