Hi all :)
I'm trying to get the functionality gained using only CSS in Opera/Gecko
etc on this page:
<http://matt.blissett.me.uk/web/authoring/css_menus/sample> to work in IE,
using javascript. My attempt is here:
<http://matt.blissett.me.uk/web/authoring/css_menus_with_javascript/sample>
The script is only parsed with IE. Why do I get an infinite loop? I have a
menu structure like this (abbreviated):
<ul id="nav">
<li>...</li>
<li>...</li>
<li>
<ul>
<li>...</li>
<li>
<ul>
<li>...</li>
<li>...</li>
<li>
<ul>
<li>...</li>
</ul>
</li>
</ul>
</li>
<li>...</li>
</ul>
<li>...</li>
</ul>
I'm using a css :hover on the LI elements to change the visibility of
their child UL elements to visible. For IE, I'm adding the class 'over' to
the LI instead. I want to do this:
when the document loads,
find the nav element,
look at it's children: --
if the child is an LI |
add the 'magic' (over class bits) |
in any case |
go through the indicated script with this element |
--
It fails, however, IE gives it's error about a script taking too long, and
crashed if I don't stop it. If I do stop it, I get some functionality --
where is it looping too much?
URL in case you missed it:
<http://matt.blissett.me.uk/web/authoring/css_menus_with_javascript/sample>
javascript:
<http://matt.blissett.me.uk/web/authoring/css_menus_with_javascript/css_menus_magic>
Aside: this is my first proper venture into Javascript, I'm impressed with
the language, it wasn't what I was expecting :)
Thanks :-)
--
Matt
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----