PDA

View Full Version : Help needed with Accordion Menu



nm67uk
03-05-2009, 05:19 PM
1) Script Title:
Accordion Menu

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

3) Describe problem:

First post, so please be gentle. This script is really cool and its doing everything I need except allowing me to highlight the currently selected item. Specifically the currently selected item when there are no children.

Example of menu:


Design & Consultancy
Engineering Services
Commissioning & Setup
People -
* person 1
* person 2
* person 3

By creating some additional CSS (to set the background image for the current item) and referencing it using the toggleclass: parameter I can get the 'People' menu to highlight.

However, I cannot find a way to get the other top level menu items to highlight; I've concluded this is because they dont have children to expand.

Any suggestions?

I started going down the route of wrapping the top level menu in <ul><li> and identifying the current item in an <a> tag (a classic solution used in simple HTML sites), but my menus are generated straight out of a CMS (Drupal in this case).

Thanks in advance

Nick

ddadmin
03-05-2009, 08:36 PM
If a header doesn't contain any children, then it's actually not even part of the collection of headers the script keeps track of. In that sense, getting those headers to be highlighted needs to involve doing something outside of the script itself, as technically these headers are no different than arbitrary links on the page.