PDA

View Full Version : setting the default drop down panel to open



davelf
04-08-2010, 08:24 AM
1) Script Title: make a default on drop down panel

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

3) Describe problem:
how to make a drop down panel default open?


thx in advanced....

ddadmin
04-08-2010, 09:46 AM
Please see: http://www.dynamicdrive.com/forums/showthread.php?t=53440

davelf
04-08-2010, 10:35 AM
nothing change ddadmin, i already replace the dddropdownpanel.js with this one
http://www.dynamicdrive.com/forums/attachment.php?attachmentid=3220&d=1269987424

you add this code right:


stateconfig: {initial: "5px", persiststate: true, initialstate:"open"}, // initial: initial reveal amount in pixels (ie: 5px)


but nothing happen, every time i open or refresh the page the panel close.

thx for your attention...:)

davelf
04-09-2010, 12:54 AM
is there any solution for my problem here,

i already try to edit this part:



setting.dir="up" //initial state of panel (up="contracted")
if (setting.stateconfig.persiststate && ddpanel.getCookie(setting.ids[0])=="down"){
setting.dir="down"
}


into



setting.dir="down" //initial state of panel (up="contracted")
if (setting.stateconfig.persiststate && ddpanel.getCookie(setting.ids[0])=="down"){
setting.dir="down"
}


it's work, every time i refresh or open the page the drop down panel always open.

the problem is, the drop down panel always open even i already close it on the first page.

the original drop down default is close, so when we open or close it that command is carried to the other page, but now it broke.

Note: i use the dropdown panel on all of my page.

thx...

ddadmin
04-09-2010, 10:56 AM
Do you have persistence enabled that may interfere with the initial state of the panel? Please post a link to the page on your site that contains the problematic script so we can check it out.

davelf
04-12-2010, 02:41 AM
this is the link to my problem page:

http://imaxxo.net/smiling/

and this is the JS that i already customize:



setting.dir="down" //initial state of panel (up="contracted")
if (setting.stateconfig.persiststate && ddpanel.getCookie(setting.ids[0])=="down"){
setting.dir="down"
}




var defaultpanel=new ddpanel({
ids: ["mypanel", "mypanelcontent", "mypaneltab"], // id of main panel DIV, content DIV, and tab DIV
stateconfig: {initial: "0px", persiststate: true, initialstate:"open"}, // 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: ["img/down.jpg", "img/up.jpg"]},
closepanelonclick: {enabled: true} // close panel when links or elements with CSS class="closepanel" within container is clicked on?
})


thank you very much ddadmin

davelf
04-14-2010, 09:16 AM
is there any other solution for this problem?:o

ddadmin
04-14-2010, 07:45 PM
Hmm your page doesn't load for me unfortunately, at the moment at least.