Cross-browser MouseEnter/Leave Solution


/ Published in: JavaScript
Save to your folder(s)

In mouseout and mouseover event handlers, use this object to check if the mouse was leaving or entering a "landmark" element. See my [MouseEnter/Leave Handlers](http://snipplr.com/view/8913/mouseenterleave-handlers/) snipplet for a practical use.

`.fromElement`: element the mouse is leaving
`.toElement`: element the mouse is entering
`.inLandmark`: true if the event fired from within the landmark
`.leftLandmark`: true if the mouse was leaving the landmark
`.enteredLandmark`: true if the mouse was entering the landmark

URL: http://test.dragonzreef.com/mouseenterleave.htm

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.