Results 1 to 5 of 5

Thread: Accordion problems

  1. #1
    Join Date
    May 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Accordion problems

    1) Script Title: Accordion

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

    3) Describe problem: Link to my page here:
    http://www.madhouse1.com/jim/menu2.php

    Ok - firstly I can't seem to make the headers drop the correct content section.. the first header ( Home) drops the second content (who we are ) - the second header drops the fourth - why?

    Secondly, when the user clicks on a header ( on click? on init? ) I want the image to change to a different one. I have looked through the examples on the script site but don't understand how to do it.

    I'm in trouble now as the client wants to see something.. :-o Help!

    Thanks
    Jim

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

    Default

    The header/sub content mismatch is due to the fact that you've given all of your headers a CSS class of "menuheaders" regardless of whether each one actually contains a sub content (DIV with class="menucontents"). You can solve the issue simply by changing the CSS class of all headers that do NOT contain a sub content to something else, for example: "singlesheader":
    Code:
        <div class="singlesheader"><a href="notable_cases.php" title="Forums" target="_self" onMouseOver="MM_swapImage('Image58','','images/menu1_r11_c1.gif',1)" onMouseOut="MM_swapImgRestore()"><img src="images/menu1_r27_c1.gif" alt="Merchandising" name="Image58" width="167" height="30" border="0" id="Image58" /></a></div>
    As to the 2nd question, are you basically asking how to have the menu automatically highlight the current menu header the page corresponds to?
    DD Admin

  3. #3
    Join Date
    May 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi - yes, so when the user clicks on a menu item, goes to that page, the image for that page changes to a highlighted one. Maybe this isn't possible and I need to have a menu on each page which I can then customise, instead of trying to use a #include?

    Thanks for your help -

    Jim

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

    Default

    There's no way for the script to automatically determine that relationship between the current page and the menu item that should be expanded. You would need to use what's available from the script's side as far as expanding a menu item after it's initially loaded, plus your own ingenuity, to make this happen.
    DD Admin

  5. #5
    Join Date
    May 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No worries - will use a separate instance of the menu on each page - then it's a no brainer to change the relevant image.

    Thanks,
    Jim

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
  •