I have an SVG with a couple paths that describe regions, like this:
<svg>
<g>
<path d="..."></path>
<path d="..."></path>
<path d="..."></path>
</g>
</svg>
And I'd like to display a div
based on which path
is hovered. I tried putting the respective div
s inside the paths in order to be able to do this in the css:
path:hover div.infobox
{
display: block
}
div.infobox
{
display: none
position: absolute
}
But that doesn't work, because the SVG is not rendered properly if I hide non SVG elements in it.
Is there an easy way to do this by CSS or with jQuery?