W
weston
So, I'm attempting to code an expanding tree menu, based off of
unordered lists containing unordered lists. I'm also trying to do it in
such a way that none of the javascript has to go inline with the
markup:
http://weston.canncentral.org/misc/webgallery/FMH/template.html
So far, so good. It seems to work in Gecko-based browsers rather well
(mouse-over "Online Services" to see it work).
However, in Internet Explorer, things are a bit different...
For one thing, it initially seemed that the "onmouseout" is not only
triggered by moving outside the LI element that contains the hidden
submenu, but also by moving onto any element which the LI contains. Not
particularly intuitive to me, but I figured I'd just code something
that tests whether the target element of the onmouseout event is a
child of the LI receiving it, and if so, keep the submenu visible, and
if not, hide it.
This helps things work under Safari (which apparently has a similar
event model), but IE still doesn't work. When I move the mouse within
the LI onto some other element contained by the LI, it seems to think
that the target element is the containing DIV (the one id'd as "nav").
Any idea what's going on here? I've been banging my head against this
for a few days...
Thanks,
Weston
unordered lists containing unordered lists. I'm also trying to do it in
such a way that none of the javascript has to go inline with the
markup:
http://weston.canncentral.org/misc/webgallery/FMH/template.html
So far, so good. It seems to work in Gecko-based browsers rather well
(mouse-over "Online Services" to see it work).
However, in Internet Explorer, things are a bit different...
For one thing, it initially seemed that the "onmouseout" is not only
triggered by moving outside the LI element that contains the hidden
submenu, but also by moving onto any element which the LI contains. Not
particularly intuitive to me, but I figured I'd just code something
that tests whether the target element of the onmouseout event is a
child of the LI receiving it, and if so, keep the submenu visible, and
if not, hide it.
This helps things work under Safari (which apparently has a similar
event model), but IE still doesn't work. When I move the mouse within
the LI onto some other element contained by the LI, it seems to think
that the target element is the containing DIV (the one id'd as "nav").
Any idea what's going on here? I've been banging my head against this
for a few days...
Thanks,
Weston