View Full Version : Issue creating "On" state styling for Anylink Drop-Down Menus...

02-22-2010, 06:59 PM
1) Script Title: AnyLink JS Drop Down Menu v2.2

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

3) Describe problem:
Here is the site I'm working on:

I need the buttons in the nav to stay while then you are on their respective page (meaning the "IT Staffing" button stays while when I'm on a page in the "IT Staffing" section.). I accomplished this by making a class for the CSS nav links like this:

<script type="text/javascript">

//anylinkmenu.init("menu_anchors_class") //Pass in the CSS class of anchor links (that contain a sub menu)


Then I just styled ".on" with a white background and applied it to the links when they are the current page, for example:

<a href="it-staffing.php" class="menuanchorclass" rel="anylinkmenu1">IT Staffing</a>
<a href="outsourcing.php" class="menuanchorclass" rel="anylinkmenu2">Outsourcing</a>
<a href="consulting-services.php" class="menuanchorclass" rel="anylinkmenu3">Consulting Services</a>
<a href="user-experience.php" class="on" rel="anylinkmenu4">User Experience</a>
<a href="about-us.php" class="menuanchorclass" rel="anylinkmenu5">About Us</a>
<a href="contact-us.php">Contact Us</a>

(user-experience being the current page).

This works just fine in firefox and Safari. However, in IE (all versions i've tested), the drop-downs stop showing up for the page with the ".on" class.

I think that explains it... Any ideas on what is doing this? Let me know if you need any more information, feel free to look through the code of the consultwebworks.com site.