I am working on a mapping engine in javascript, using jQuery for DOM manipulations and events.
One of my layers contains a div with several img elements, all positioned absolutely within the div using margins.
It is very probable that some of the imgs overlap, and when the user mouses over the imgs I want to build a list of all of the imgs the mouse is in.
My first approach was to add to the list when the mouse enters an img, and remove from the list when mouseleave is fired. However, when "bubbling" to a sibling node, mouseleave is being fired before the mousenter of the other img the mouse is over. (Even though the mouse is still over both imgs)
Is there a solution to this sort of problem? I've also tried switching to mouseover ad mouseout with similar problems.