Log in

View Full Version : Resolved Glossy Accordian -active menu



bad inferno
01-31-2009, 09:38 PM
1) Script Title: Glossy Accordian CSS

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-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

Nile
02-01-2009, 01:28 AM
Change the onopenclose section to:


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


.glossymenu a.menuitem:hover

And replace it with

.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. (http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment2.htm).

bad inferno
02-01-2009, 01:48 AM
Thankyou

worked great

Nile
02-01-2009, 01:55 AM
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"