PDA

View Full Version : help ddsmoothmenu problem



COMECOCO
10-09-2011, 07:34 AM
1) Script Title: Smooth Navigational Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddlevelsmenu/

3) Describe problem:

Hi guys,

i recently bought a template who uses the ddsmoothmenu. If i click an item the background goes black indicating that item is "selected"....

well im reading right now this is done by css, some script apply the class to the selected item and the back goes black.

well , i move all the divs containing the menu from the template i bought to a complete new one (i want to start a diferent project, but i want to use the same menu as the template). I check that every import of a css file, js file and so on its done correctly. Chech the ids and class tags of the divs to match the actual css files imported. i double and triple check everything (or not? :mad:).

The menu looks goos, the animation works and the css are applyed but, when i click a diferent item the black background stays at home item menu and never goes to the real "active" item. Im going crazy here i dont find the error..

Please if someone can help me out here i really apreciate!

Thanks in advance... Omar

ddadmin
10-12-2011, 07:02 PM
There is no built in mechanism by the script to highlight the menu item the user is currently on (based on the page he/she is on), so I assume you're manually adding a CSS class to the menu item in question to accomplish this? Note that the script does dynamically/temporarily add a class of ".selected" to the parent menu item the mouse is currently over (including any of its sub menus), which by default can be modified inside topbar.css, specifically:


.mattblackmenu a.selected{
background: black; /*background of tab with "selected" class assigned to its LI */
}

But modifying this CSS rule only alters the style of the parent menu item the mouse is currently over- the rule is removed as soon as the mouse is out of this menu item plus all of its child menus. You can see this in action by visiting the DD script page, and noticing how the parent menu item's background color turns black while the mouse is over it or any of its children, and turns back to gray when it's not.