Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Bullet List Accordion Menu

  1. #1
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Bullet List Accordion Menu

    1) Script Title: Bullet List Accordion Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...enu-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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sounds like you need to set persiststate: false (from the Full HTML Source: section on the demo page, change highlighted):

    Code:
    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:

    Code:
    	defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content
    line. You could change that to:

    Code:
    	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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ilemon (07-06-2012)

  4. #3
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    the status is allready on false...

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ilemon (07-06-2012)

  7. #5
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    the defaultexpanded is empty...


    thanks a lot for your help


    Edit: sorry that was an old version, its re up't
    Last edited by ilemon; 07-06-2012 at 07:09 AM.

  8. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    .

    Your page is in violation of Dynamic Drive's usage terms, 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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ilemon (07-06-2012)

  10. #7
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    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?
    Last edited by ilemon; 07-06-2012 at 07:34 AM.

  11. #8
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    aah you had right.... it work now thanks a lot... donate

    and how is with the terms? are they ok now?
    i addet the
    Code:
    /***********************************************
    * 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....
    Last edited by jscheuer1; 07-06-2012 at 08:32 AM. Reason: Format

  12. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    Last edited by jscheuer1; 07-06-2012 at 04:42 PM. Reason: user request - remove url's
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  13. #10
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    okay now, its by all pages. can u please delte the url?

    thanks again and have a nice day

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •