Forum Moderators: open
In the head:
<script>
function saySomething() {
alert('something');
}
</script>
In the body:
<div onmouseout="saySomething();">
<div>Test 1</div>
<div>Test 2</div>
<div>Test 3</div>
<div>Test 4</div>
<div>Test 5</div>
</div>
I want to be able to mouse between the "Test" divs and once I finally move out of the bounds of all of them, I want to trigger the saySomething() script. However, in Netscape/Mozilla, it appears that when mousing into one of the "Test" divs, the browser thinks that you've left the containing div and triggers the script.
Can anyone think of a way that I could do this? The actual application is a dynamic menu. These "Test" divs are navigation elements. When you mouse away from the entire menu, a script will trigger to hide the menu.
Thanks.
Since this happens too fast for the user to see, just make each div element have that behavior, have the script make them all visible on mouseover, each would need it's own id, then when your mouse is no longer over any of them, the main menu block will disappear, since the script makes them all invisible on mouseoff, unless you wanted it to be visible first, then you'd have to set that in CSS, the css would then be overridden by the javascript.
There might be a more elegant solution out there, but I got the same results you got in IE 5.5 too, it didn't work on any browser I tested it in.