Here is the scenario:
You have two images and they are stacked on one another. The highest-order z-indexed image is responsible for handling click events (think Google's Map API) and is transparent, while the image below is responsible for a visual representation.
Here is a pseudo-HTML/CSS representation:
div.visual-container {
width: 10px;
height: 10px;
}
div.visual-container:hover {
background-color: #555;
}
div.click-container {
width: 10px;
height: 10px;
}
<div class='lowest'>
<div class='visual-container'></div>
</div>
<div class='highest'>
<div class='click-container'></div>
</div>
Now, when the 'highest' element is clicked, the event is dispatched also on the 'lowest' element.
The basic idea:
function onHoverEventForHighest() {
createMouseEvent(lowest_element, 'mouseover', event);
};
This part is fine and transfers the event accordingly, but it does not seem to invoke the :hover CSS psuedo-class.
Has anyone had any luck with doing something of this nature?