You need to create a mouseover event on the block, but this event also works on all children of this node, how can you ignore all children that are inside the block. dug in the direction of stopPropagation (), but did not find the necessary implementation.
<div id="test"> <div class="child"></div> <div class="child"></div> </div> document.getElementById('test').addEventListener('mouseover',function(){ // ΠΊΠ°ΠΊΠ°Ρ ΡΠΎ Π»ΠΎΠ³ΠΈΠΊΠ° },false); And in this case, mouseout works when you hover on the child class.