On 04/09/07, WEZ! <[EMAIL PROTECTED]> wrote:
> I have worked on a three-tier drop down menu system designed with
> pure css for functionality and javascript to achieve functionality in
> IE.
> The website can be found here:
> http://www.newearthpermaculture.com.au/bm/BusMentorMenu18.htm
>
> So far the CSS side appears to function flawlessly (aside from other
> layout issues). The problem are now with the javascript code and IE.
>
> On a purely validation issue the javascript code grabs 'li' through
> child nodes on a 'id' and assigns them a class which has mouseover,
> mouseout commands attached. This code however only gathers the direct
> children and not nested children below this. This amounts to having
> to use a second run through the javascript and multiple id's which of
> course fails validation. Does anyone who knows javascript better than
> myself tell me what needs changing in this code to get all children
> gaining the class not just the direct child nodes. Here is the code:

This is more of a Javascript issue than CSS, but the script on this page:

http://www.htmldog.com/articles/suckerfish/

should do what you're looking for. The basic function you need is
getElementsByTagName, which returns all elements (including deep
descendants), so you don't need to put an ID on anything other than
the top-level UL.

Also, performance can suffer if you have a lot of handlers which all
do the same thing, sometimes it's better to just attach one handler to
the UL and let it work out which LI you actually clicked on.

cheers,

Tom
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to