PDA

View Full Version : Bullet List Accordion Menu



ilemon
07-06-2012, 06:02 AM
1) Script Title: Bullet List Accordion Menu

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

3) Describe problem:
good morning every body
i use this script for my own webpage. some menu points have a submenu and other not. my question is when i first navigate to a page of the submenu is the menuheader expanded. if I go after this to an other menu point without any submenu, is the previeous menuheader still open...
what i need to do to close on a new page every menuheaders?

thanks a lot and sorry for my stupid english ;)

jscheuer1
07-06-2012, 06:33 AM
Sounds like you need to set persiststate: false (from the Full HTML Source: section on the demo page, change highlighted):


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", "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: [0], //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: false, //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: "fast", //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
}
})

Notice also the:


defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content

line. You could change that to:


defaultexpanded: [], //index of content(s) open by default [index1, index2, etc]. [] denotes no content

That way none would be open on any page. Or you could set each page's defaultexpanded to reflect the menu that corresponds to that page.

ilemon
07-06-2012, 06:36 AM
the status is allready on false...

jscheuer1
07-06-2012, 06:38 AM
Then the menu listed in defaultexpanded should be open on each page.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

ilemon
07-06-2012, 06:50 AM
the defaultexpanded is empty...


thanks a lot for your help


Edit: sorry that was an old version, its re up't

jscheuer1
07-06-2012, 07:07 AM
.

Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

Um, I see two inits. They both have persiststate: true. The first one has defaultexpanded: [0], the other has it empty.

And I don't see any of the links leading anywhere. That makes it impossible to tell what the menu does when it navigates to another page.

Set both of the persiststate to false and both defaultexpanded to empty.

The browser cache may need to be cleared and/or the page refreshed to see changes.

Once you start navigating to actual pages, you may want to set the defaultexpanded differently on each page so that the menu for that page will be open by default.

ilemon
07-06-2012, 07:16 AM
sorry i show you an old version of the page... i had it re up't


first press --> laserschneidetechnik
then press -->laserstanztechnik

thats the problem.....

are the terms now ok?

ilemon
07-06-2012, 07:29 AM
aah you had right.... it work now thanks a lot... donate ;)

and how is with the terms? are they ok now?
i addet the
/***********************************************
* Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/ in the header....

jscheuer1
07-06-2012, 08:37 AM
Great! I'm glad it's working.

And, yes that's good on the credit on the page we navigate to. But it's still missing on the page we start from.

ilemon
07-06-2012, 10:41 AM
okay now, its by all pages. can u please delte the url?

thanks again and have a nice day

jscheuer1
07-06-2012, 04:47 PM
You're welcome. I've removed the addresses, there were no URLs. You have already removed the only one - it was in your post.

If you're worried about these posts showing up in searches for your site, it may take a little time for the search engines to re-index them.

If you need faster results there, you will have to contact the search engines.