Let's say I have 2 circles one over the other (intersecting), is there a way to have them both access mouseover, mouseenter, and mouseleave? I want them to stay independent from each other, but when the cursor goes over both they should both change color.
If my cursor is only over red circle, then only red should change, and if my cursor is on blue then only blue should change. If my cursor is on both (intersection) then both should change color. These circles will be moving so I don't want a static solution for the intersection.
I know pointer-events: none; will remove the functionality allowing me to access the lower layer, but I want them to both be active.
CIRCLE.addEventListener('mouseenter', changeColorOnTouch, false);
CIRCLE2.addEventListener('mouseenter', changeColorOnTouch2, false);
CIRCLE.addEventListener('mouseleave', function(){CIRCLE.removeAttribute("style");}, false);
CIRCLE2.addEventListener('mouseleave', function(){CIRCLE2.removeAttribute("style");}, false);