Results 1 to 4 of 4

Thread: Glossy Accordian -active menu

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

    Default Glossy Accordian -active menu

    1) Script Title: Glossy Accordian CSS

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

    3) Describe problem:

    I am trying to get the background of the active (expanded) menu item to change color. I basically want the menu item once selected to keep the same color as it does on hover.

    I tried to add to the css the following however it did not work

    .menuitem:active{
    background-image: url(glossyback2.gif);
    }

    I also assume I should be able to do it under the
    ddaccordion.init
    togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"],

    However cannot seem to workout how to place background-image: url(glossyback2.gif); within the togglehtml function


    any help greatly appreciated...

    rob
    Australia
    Last edited by bad inferno; 02-01-2009 at 03:08 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Change the onopenclose section to:
    Code:
    	onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    		if(state == "block"){
    		   header.id = "active";
    		} else {
    		   header.id = "";
    		}
    	}
    Then in your css find
    Code:
    .glossymenu a.menuitem:hover
    And replace it with
    Code:
    .glossymenu a.menuitem:hover, .glossymenu a#active
    That should do it.

    If it doesn't, take a look at this, it tells you how to use the onopenclose function..
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    bad inferno (02-01-2009)

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

    Default

    Thankyou

    worked great

  5. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I'm glad to help you bad inferno!
    Your welcome!
    It seems your topic is solved... Please set the status to resolved.. To do this:
    Go to your first post ->
    Edit your first post ->
    Click "Go Advanced" ->
    Then in the drop down next to the title, select "RESOLVED"
    Jeremy | jfein.net

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
  •