Results 1 to 3 of 3

Thread: Always on button? (MLM #2)

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

    Default Always on button? (MLM #2)

    1) Script Title: jQuery Multi Level CSS Menu #2

    2)Script link: http://www.dynamicdrive.com/style/cs...el_css_menu_2/

    3) Describe problem:

    Hi all, new to the site but have heard you are all really helpful!

    I have a problem with the 3 level DD menu here;

    http://www.dynamicdrive.com/style/cs...el_css_menu_2/

    It all works fine but what I need to do is have the current page button highlighted for whichever page the viewer is on (for instance the off state is grey and on state is orange on mouseover - but if they navigate to the contact page (eg) I want the link to stay orange (not go back to grey)- I really have no idea on this (have looked at other css where this is done but it will not work on mine)?

    Help REALLY appreciated!

    TIA.

    Pete

  2. #2
    Join Date
    Sep 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Understand the frustration. Try opening your "ddsmoothmenu.css" file and find the following line


    .ddsmoothmenu ul li a.selected{ /*CSS class that's dynamically added to the currently active menu items' LI A element*/
    background: black;
    color: white;
    }


    change: background: orange (or hex equiv.)

    This will make the background turn orange -- if you want the text a different colour, change the "color: white;" line.

    Hope that this helps.

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

    Default

    Actually, the CSS code Johnathan posted refers to that found inside DD Smooth Menu, and not jQuery Multi Level CSS Menu #2. Regardless though, the OP is asking about something different if I understood correctly. He means how to have the main menu item corresponding to the current page be selected. There's no way for the script to automatically determine that relationship and highlight the menu item in question unfortunately. Normally you would either manually apply a CSS class on each page to the correct menu item, or make that determination using server side scripting, before the HTML of the page is even output.
    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
  •