Results 1 to 5 of 5

Thread: Accordion menu header url link?

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

    Default Accordion menu header url link?

    Accordion menu

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

    I've got the menu working as I need, but am trying to get the expanding headers to link to html pages. I've tried to do this a variety of ways, but when I click on the header, it expands the menu but doesn't open the page it's linked to.

    How should I be coding it to do this? Thank you.

  2. #2
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I have the same problem, and tried nearly everything...
    Anyone ideas?

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

    Default

    I found that if you remove the "expandable" from the "menuheader expandable" line of code you can link it and it works, yet still expands the menu.

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

    Default

    I don't really understand what you mean.
    So, if I have the following:
    <h3 class="mypets">Dogs</h3>
    <div class="thepet">
    <img src="http://i10.tinypic.com/7xlrga1.jpg" />
    The dog is a domestic subspecies of the wolf, a mammal of the Canidae family of the order Carnivora. The term encompasses both feral and pet varieties and is also sometimes used to describe wild canids of other subspecies or species. The domestic dog has been (and continues to be) one of the most widely-kept working and companion animals in human history, as well as being a food source in some cultures.
    </div>

    I have to change ... what?

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

    Default

    There's quite a few threads on this already actually. The script by default disables any link within a header if it's set to expand onClick. If it doesn't do this, clicking on a header will simply take the user to another page, instead of expand a sub content. One thing you can do is set the headers to expand onMouseover instead inside the configuration code. When you do that, any link within the header will work:

    Code:
    ddaccordion.init({
    	headerclass: "silverheader", //Shared CSS class name of headers group
    	contentclass: "submenu", //Shared CSS class name of contents group
    	revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click" or "mouseover
    	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: true, //Specify whether at least one header should be open always (so never all headers closed)
    "
    "
    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
  •