View Full Version : ddaccordion: follow headerlinks when menu is open

06-25-2010, 11:23 AM
1) Script Title: ddaccordion

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

3) Describe problem:

Hi i'm working on this: http://bureaucreaties.nl/dev/0016sd/nl/producten/8.html

I'm using:
revealtype: "clickgo"

This is great because i like the effect to open the menu under the header end then follow the header link which i need to get to the overview page

The problem is that if the menu under a header is allready opened and i click on the header again then the page is not being redirected to the headerlink (in this case the overviewpage).

Is there a way to get that done?

I hope someone can help me.
Kind regards, Bas

06-28-2010, 08:16 PM
That's by design actually. When a header is already expanded, it's assumed the user is already on the page the header links to. Clicking on the header again contracts the header, instead of just reloading the page for example...

06-29-2010, 07:02 AM
If it's by design then i guess it's not designed with this situation in mind.

Take a look at a menu structure like this.
How can someone return to header2 (Overwiewpage) if the menu is open? For example looking at specific 1?

> Header 1
> Header 2 (Overviewpage)
--> specific 1
--> specific 2
--> specific 3
> Header 3

I would like to change the script to get this done, but my script skills are not that good. I will try it this week, but i assumed that someone of dd could do this more easily.

07-22-2010, 02:51 PM
well, i have tried to hack it the way i described above, but my knowledge of javascript and jquery just don't get me there.

I hope that more people see the extra value to code a function in this script to do that.

Is there anyone that can help me. Also when ik use clickgo it works fine except for the last menu. It opens and when the page loads in collapse again. Is this a bug?

Thanks in advance

07-22-2010, 02:58 PM
btw i use this init:

headerclass: "submenuheader", //Shared CSS class name of headers group
contentclass: "submenu", //Shared CSS class name of contents group
revealtype: "clickgo", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
onemustopen: true, //Specify whether at least one header should be open always (so never all headers closed)
animatedefault: false, //Should contents open by default be animated into view?
persiststate: true, //persist state of opened contents within browser session?
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["suffix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "fast", //speed of animation: "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
//do nothing
if (isuseractivated==true){
// alert('cool')
if (state=="expand"){
// alert('also cool')