bravesirrobin
4 Oct 2007, 7:40 PM
I am getting frustrated with the "mouseout" event. It fires whenever the element you move the mouse over changes, even if you're still inside the original element.
E.g.:
<ul onmouseout="alert('dude')">
<li>item</li>
<li>item2</li>
</ul>
In this scenario, if you hover over "item", then move your mouse to hover over "item2" you will see the alert, even though you haven't left the "ul" element that the event is attached to.
Now, I started writing myself a function that would check the position of the element in question and the actual location of the mouse to check if it had really left the element, but then I remembered seeing a function / custom event in a library somewhere that did this for you.
Now I can't for the life of me find it again. Does anyone know of such a function? Is there anything in ext? Or mochikit? or mootools? or dojo? However, if it's in prototype I'm not interested, I'll just write it myself :p.
Any help much appreciated! :)
Ta,
Robin.
E.g.:
<ul onmouseout="alert('dude')">
<li>item</li>
<li>item2</li>
</ul>
In this scenario, if you hover over "item", then move your mouse to hover over "item2" you will see the alert, even though you haven't left the "ul" element that the event is attached to.
Now, I started writing myself a function that would check the position of the element in question and the actual location of the mouse to check if it had really left the element, but then I remembered seeing a function / custom event in a library somewhere that did this for you.
Now I can't for the life of me find it again. Does anyone know of such a function? Is there anything in ext? Or mochikit? or mootools? or dojo? However, if it's in prototype I'm not interested, I'll just write it myself :p.
Any help much appreciated! :)
Ta,
Robin.