Results 1 to 6 of 6

Thread: Accordion Menu Help!

  1. #1
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Accordion Menu Help!

    1) Script Title: Accordion Menu Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ordionmenu.htm

    3) Describe problem: I'd like to use this for my website's navigation. However I need it to direction to a page when a header is clicked as well. For example, for any one of the menu headers that are to expand when clicked on they direct to a page and they expand the menu. The menu here only expands when a header is clicked instead of both. Is this possible? Thanks in advance!

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

    Default

    You could set the headers to expand/ collapse onMouseover instead of onClick. When you do that, any link within the header will respond to a normal click, so when the user moves over a header, it expands, and when they click on the header, he's taken to the target page. If you have persistence enabled within the script, that same content should still remain open on the target page.
    DD Admin

  3. #3
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    that'd be acceptable! Unfortunately I know absolutely nothing about javascript ; ;! Could you point me to where these changes need to be made?

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Find this code in step two:
    Code:
    revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
    and change it to this:
    Code:
    revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover"
    To enable persistence, make sure this part is set to true:
    Code:
    persiststate: true, //persist state of opened contents within browser session?

  5. The Following User Says Thank You to Snookerman For This Useful Post:

    Nyris (12-23-2008)

  6. #5
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Code:
    config.revealtype=/^(click)|(mouseover)$/i.test(config.revealtype)?config.revealtype.replace(/mouseover/i, "mouseenter") : "click"
    this is the line of code that I found.. Is this the same thing? lol

  7. #6
    Join Date
    Dec 2008
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Nevermind I found it! I was looking in the javascript file and that code you mentioned is in the actualy html files. Thanks a lot it works like a charm now!!!

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
  •