Results 1 to 4 of 4

Thread: Accordion Menu script help needed...

  1. #1
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool Accordion Menu script help needed...

    1) Script Title:

    Accordion Content script (v1.7)

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...ordionmenu.htm

    3) Describe problem:

    I need to disable the "default expanded" feature so that when a page loads the submenu is hidden on all menu items. Any help is greatly appreciated!!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Have you tried simply setting "defaultexpanded" to "[] in your initialization code:

    Code:
    ddaccordion.init({
    	headerclass: "mypets", //Shared CSS class name of headers group
    	contentclass: "thepet", //Shared CSS class name of contents group
    	revealtype: "mouseover", //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.
    DD Admin

  3. #3
    Join Date
    Jul 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Here is a link to my script:
    http://www.joeymerchant.com/aai/ddaccordion.js

    I tried looking for such an option but my .js file seems slightly different.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The defaultexpanded: [], option is not found inside the .js file, but rather, the initialization code in the HTML of your page itself that shows the Accordion Menu.
    DD Admin

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
  •