Skip to content
Advertisement

mouseover map region to display image and mouseout to hide

I’ve an Europe map. When i mouse-over Italy region, i wish to display the map image and disappear when mouse-out. However, i cant make it works perfectly.

Below is the HTML

JavaScript
JavaScript
JavaScript

Here’s my code http://codepen.io/w3nta1/pen/JWrmaz

Advertisement

Answer

Changed the answer.

After tinkering a bit I realized that the problem is that the image overlays the map. The solution was to move the use map on to the italy image and switch to opacity instead of display.

the code became a follows:

Please note that I eyeballed the area approximately.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement