Prevent an element from being the target in a document mouseover

Posted by Sander on Stack Overflow See other posts from Stack Overflow or by Sander
Published on 2010-05-13T00:09:13Z Indexed on 2010/05/13 0:34 UTC
Read the original article Hit count: 222

Filed under:

I'm building an firebug-like inspection tool for my page. When the mouse enters an element, the element should be highlighted. Now I'm creating an element which I position absolute on top of the target element, this however means the next mousemove event (which is bound to the document) will fire with the actual "highlight element" as the target.

Is there a way to prevent the "highlight element" from being the target element in the mousemove event? The element already has a transparant background.

© Stack Overflow or respective owner

Related posts about JavaScript