studio-18
06-15-2009, 10:18 AM
1) Script Title: ddaccordion.js (version1.7.1)
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm
3) Describe problem:
I implemented a nested type of the ddaccordion script on my dynamic web template (xhtml). Tested the skript (works fine)
Now I tried to implement some kind of an "gotoindex" button where i defined an "onclick" event wich should do two things:
move back to my index.htm page and collapse all expandable categoryitems and subexpandabale subcategoryitems.
I tried it in several ways but the menu won't collapse the items. They are quivering but not closing. Would be thankful for any suggestion how to do it.
Here is my init function:
ddaccordion.init({ //top level headers initialization
headerclass: "expandable", //Shared CSS class name of headers group that are expandable
contentclass: "categoryitems", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
// mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
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: false, //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: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "normal", //speed of animation: integer in milliseconds (ie: 200), or keywords "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
}
})
ddaccordion.init({ //2nd level headers initialization
headerclass: "subexpandable", //Shared CSS class name of sub headers group that are expandable
contentclass: "subcategoryitems", //Shared CSS class name of sub contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
//mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
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: false, //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: ["opensubheader", "closedsubheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "normal", //speed of animation: integer in milliseconds (ie: 200), or keywords "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
}
})
Here is the <a> Tag where i throw the collapseall function:
1st. Case:
<a href="../sites/index.htm" class="Sitemap" style="color:#660066" onclick="ddaccordion.collapseall('subexpandable'); ddaccordion.collapseall('expandable'); return false;">Startseite </a>
Result: The Menu is Collapsing completely but the href site won't be loaded afterwards.
2nd. Case: (without the return flag)
<a href="../sites/index.htm" class="Sitemap" style="color:#660066" onclick="ddaccordion.collapseall('subexpandable'); ddaccordion.collapseall('expandable');">Startseite </a>
The Menu tries to collapse (the entries are quivering) without success and the href site will be shown.
At first I tried to close the menu with the "expandable" part only, but this is just a working solution for a ddaccordion menu without nests.
Thanks for any suggestion
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordion.htm
3) Describe problem:
I implemented a nested type of the ddaccordion script on my dynamic web template (xhtml). Tested the skript (works fine)
Now I tried to implement some kind of an "gotoindex" button where i defined an "onclick" event wich should do two things:
move back to my index.htm page and collapse all expandable categoryitems and subexpandabale subcategoryitems.
I tried it in several ways but the menu won't collapse the items. They are quivering but not closing. Would be thankful for any suggestion how to do it.
Here is my init function:
ddaccordion.init({ //top level headers initialization
headerclass: "expandable", //Shared CSS class name of headers group that are expandable
contentclass: "categoryitems", //Shared CSS class name of contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
// mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
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: false, //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: ["", "openheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["prefix", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "normal", //speed of animation: integer in milliseconds (ie: 200), or keywords "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
}
})
ddaccordion.init({ //2nd level headers initialization
headerclass: "subexpandable", //Shared CSS class name of sub headers group that are expandable
contentclass: "subcategoryitems", //Shared CSS class name of sub contents group
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
//mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
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: false, //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: ["opensubheader", "closedsubheader"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
animatespeed: "normal", //speed of animation: integer in milliseconds (ie: 200), or keywords "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
}
})
Here is the <a> Tag where i throw the collapseall function:
1st. Case:
<a href="../sites/index.htm" class="Sitemap" style="color:#660066" onclick="ddaccordion.collapseall('subexpandable'); ddaccordion.collapseall('expandable'); return false;">Startseite </a>
Result: The Menu is Collapsing completely but the href site won't be loaded afterwards.
2nd. Case: (without the return flag)
<a href="../sites/index.htm" class="Sitemap" style="color:#660066" onclick="ddaccordion.collapseall('subexpandable'); ddaccordion.collapseall('expandable');">Startseite </a>
The Menu tries to collapse (the entries are quivering) without success and the href site will be shown.
At first I tried to close the menu with the "expandable" part only, but this is just a working solution for a ddaccordion menu without nests.
Thanks for any suggestion