...

View Full Version : bubbling event, nested elements, mouse out



BubikolRamios
02-14-2007, 02:44 AM
looking for function that would tell me that on mouse out was realy out of outer DIV i.e. id = "1"



<body>
<DIV id = "1" onmouseout = "somefunc(this,event)">

<DIV id = "11">
<DIV id = "111">
</DIV>
</DIV>

<DIV id = "12">
</DIV>

</DIV>
<body>


Did tons of googling, testing, no use. Main reason that experiments failed was
that move out of div 12 doesn't move into div1 but direct to body.

this:


var exitElement = evt.relatedTarget || evt.toElemenn

returns into which element mouse moved.
our right answer would be: exitControl is valid if it is
parent node, sibling or any higher placed elements in DOM tree looking at
DIV id = "1"



any ideas, help appreciated.

chump2877
02-14-2007, 02:56 AM
i don;t really have time right now to look over your code, but I just had this issue a couple of days ago...try checking out these links:

http://dynamic-tools.net/toolbox/isMouseLeaveOrEnter/

http://www.quirksmode.org/js/events_order.html

BubikolRamios
02-14-2007, 08:31 PM
The first link solves the problem. Works the same on IE and FF.

Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum