If mouseover triggered, there must be mouseout
In case of fast mouse movements, intermediate elements may be ignored, but one thing we know for sure: if the pointer “officially” entered an element (mouseover event generated), then upon leaving it we always get mouseout. !!!(descendants까지 Count하고 버블링되는 이벤트임.)
mouseover 이벤트가 trigger된다면 필연적으로 mouseout 이벤트 또한 trigger된다.
event.target
– is the element where the mouse came over.event.relatedTarget
– is the element from which the mouse came (relatedTarget
→ target
).Events mouseenter/mouseleave
are like mouseover/mouseout
. They trigger when the mouse pointer enters/leaves the element.
But there are two important differences:
mouseenter/mouseleave
do not bubble.!!2가지 중요점이 있다.