PDA

View Full Version : DD Drop Down Panel expand horizontally?



Code Red
01-28-2009, 12:11 PM
1) Script Title: DD Drop Down Panel

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

Great script, thanks a lot for this - I've modified it to work with PHP dynamic content and multiple collapsing windows. Anyway, I've got a feeling I already know the answer to this one, :D but is it possible to modify the code so that the hidden content expands horizontally instead of vertically?

I'm not a Javascript expert, but I'm guessing that the animation effect is applied in stages, each time the div is slightly longer? If so, could the stages be applied horizontally so it gets wider each time?

p15
05-14-2011, 09:29 PM
I've modified it to work with PHP dynamic content and multiple collapsing windows.

I've been working on this for a while. Ive got the content side working (i think) but I'm struggling with the JS side. I have changed the .js file to a .php file and changed the final variables section as follows:


<?
$var = ". $category->category_nicename.";
?>


var defaultpanel=new ddpanel({
ids: ["<? echo $var; ?>panel", "<? echo $var; ?>content", "<? echo $var; ?>tab"], // 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: 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?
})

My php knowledge is limited to middle of the road wordpress and js is very limited indeed!

Thanks in advance for your help?

ddadmin
05-15-2011, 07:15 PM
Have you looked at Horizontal Accordion (http://dynamicdrive.com/dynamicindex17/haccordion.htm) instead and using that as the basis of what you're trying to achieve?