> > SO... Feedback is most welcome... thank you. > > > > > > Minimal example 1: http://www.ximbalo.com/test/ddmenu1.htm > > Slightly more robust: http://www.ximbalo.com/test/ddmenu2.htm > > As is often the case unfortunately, those menus don't work for keyboard > users. > > In IE 5 mac, I get a js error: this.lastChild.style is not an object > Firefox/Safari/iCab3.0beta: works with the rodent. You might want to > hide the bullets form your drop down lists.
Yes, your script assumes a lot: - That the visitor has a mouse (no onclick events) - That lastChild is available (checking its existence and nodeType will fix this issue - some browsers rightfully see whitespace as a child node) It also mixes presentation and behaviour by accessing the style collection instead of applying and removing a class. It hides elements via visibility hidden, and shows them via JavaScript, meaning it might make it impossible ever to reach the child menus for some assistive technology[1] and for users without JavaScript. If you keep CSS on and turn off JavaScript, you cannot reach any sub menu (with a mouse) , so, no, it does not degrade well. document.all && document.getElementById is odd, as the latter is enough to test for modern browser (unless you want to block out some older Opera versions, which means you'll need to check for createElement, too). It is a great idea to try to make a clean script for this, but we do these for the visitor, not for us. That is why I [2] tried to - Keep all the look and feel and hiding and showing in CSS - Add the behaviour via JS - Keep it device independent - allow for a non-collapsing "current" section My solution is not perfect either, as you will have to tab through invisible links to navigate the menu, and begin to doubt there is a perfect solution for this, although Al's post earlier has some good points, but his code is very complex again and you might see it as "too complex" :-) HTH Chris [1] http://css-discuss.incutio.com/?page=ScreenreaderVisibility [2] http://www.onlinetools.org/tools/yadm/ -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/