If the overlapping elements are dynamic, I don’t think that this can be done using a normal bubble event, since the two duplicate elements in question are “siblings”.
I had the same problem and I was able to solve it with more hitTest vulnerabilities, where I check if the user position of the mouse is within the same area.
function _isMouseOverMe(obj){
var t = obj.offset().top;
var o = obj.offset().left;
var w = obj.width();
var h = obj.height();
if (e.pageX >= o+1 && e.pageX <= o+w){
if (e.pageY >= t+1 && e.pageY <= t+h){
return true;
}
}
return false
}
source
share