How to find what element mouse is over in Prototype

Posted by DavidP6 on Stack Overflow See other posts from Stack Overflow or by DavidP6
Published on 2010-04-22T20:54:34Z Indexed on 2010/04/22 22:03 UTC
Read the original article Hit count: 218

Filed under:
|

I have a situation where an element is shown using ajax. I have attached mouseenter and mouseleave events to it to show a menu connected to the element using prototype. This works fine, but the problem I am having is that if a user has his/her mouse in the place where the element is shown before it is shown, the mouseenter does not get triggered and the attached menu does not get shown. I already have an afterFinish function that is called after a SlideDown effect, so I was thinking I could put another function in there to check if the users mouse is over the element or not. How would I go about checking what element the users mouse is over in prototype?

© Stack Overflow or respective owner

Related posts about prototype

Related posts about JavaScript