0

Here is my dilemma:
I'm attempting to make my navigation work for the site mobilityidaho.org. On the home page, there are no problems at all with superfish working properly. When you navigate to any other page, the CMS I am using launches a javascript file that attaches the class "selected" to the li's in my navigation. Superfish cannot handle having a class assigned to the li and basically, shuts down any of the effects associated with the jquery.

I can handle this, but the "selected" li becomes inaccessible for IE6 users (tabbing through works, but who tabs?) It's a government site so it needs to be ie6 compatible.

Also, the CMS we use does not have the option of not assigning the selected class name so deleting that javascript file is out of the question as well.

My question is this: Is there a way to rewrite superfish to work with an <li> that has a class or should I look for a different dropdown nav solution?

David Ansermot
  • 6,052
  • 8
  • 47
  • 82
brunam
  • 825
  • 2
  • 14
  • 26
  • are you sure the problem is to do with other classes assigned to the li elements? Had a look through the superfish source at http://users.tpg.com.au/j_birch/plugins/superfish/example.html to see if I could see that classname used and thus causing a conflict, but it doesn't appear to be. How are you handling the classes being added by the CMS? – Russ Cam Sep 08 '09 at 21:59
  • Thanks for building that out for me. I think the problem lies in the fact that the cms adds the class dynamically through their javascript. I've set up a real basic IE6 test page http://valitics.com/test1 I think it's to due with our CMS for sure – brunam Feb 03 '10 at 23:07

1 Answers1

0

When faced with an issue so specifically unworkable, like what you have here, where you can't just replace a CMS and you have to cater to a wide audience - even if they really should just update their browser, the simplest solution is to sniff them out, and display appropriately. What I mean is:

 if(IE6)
 {
      displayMenu(IE6);
 }else{
      useSuperFish();
 }

Here is some reference material on browser sniffing: Using jQuery for IE6 specifically. Or some more reference material using navigator.says() and gives you information for all versions of Chrome, Firefox and IE, which could be really handy for a whole bunch of reasons - but maybe unnecessary for this instance. Particularly because the jQuery is a one - liner:

 if($.browser.msie && $.browser.version=="6.0") alert("Im the annoying IE6");

Hope this helps!

Community
  • 1
  • 1
aleksandar
  • 186
  • 12