1) Script Title: Bullet List Accordion Menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...enu-bullet.htm
3) Describe problem: hello everyone,
i have been using DD scripts from some time, but i am new on this forum.
i am using this this accordion menu on a website. i read the forum for the help on this menu, but to no avail.
The menu works perfectly with the features given on the above page. but in addition to expanding the submenu when one clicks on the header, i also need to open another page. Header itself is also a link.
Now there is a function called onopenclose(),
but it is called only when a header collapses or expands.
but in my case, if the header is open, it is required to remains open. even on clicking on it. i have setonemustopen=true
so this function is not triggered when that header is clicked.
my code is like this
i really need this badly. Can somebody suggest a solution for this?Code:<script type="text/javascript"> ddaccordion.init({ 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" 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: [1], //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: ["", "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: "slow", //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 if(index ==0 && document.location != "Payments.html" && isuseractivated){ document.location = "Payments.html"; } if(index ==1 && document.location != "BackOfficeMgmt.html" && isuseractivated){ document.location = "BackOfficeMgmt.html"; } //do nothing } }) </script>
i would really appreciate your help. thanks



Reply With Quote
wow, the script on the link u gave works wonderfully for me.
Bookmarks