I have a smaller image which is of a control with 8 buttons, I have set up 8 area shapes so when what looks like a button is clicked the larger main image is updated.
When an area shape is clicked the relevant image loads, but I want the image to fade in and the old image to fade out.
Is this possible? Happy to explore Javascript and Jquery solutions. Thanks.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TEST</title>
<script type="text/javascript">
function showImage(image){
var mainImage = document.getElementById('mainImage');
mainImage.src = image;
}
</script>
</head>
<body>
<div><img src="button.jpg" width="260" height="193" border="0" usemap="#Map" />
<map name="Map" id="Map">
<area shape="rect" coords="61,21,120,55" href="#" onclick="showImage('A.jpg')" />
<area shape="rect" coords="147,21,205,54" href="#" onclick="showImage('B.jpg')" />
<area shape="rect" coords="60,58,121,90" href="#" onclick="showImage('C.jpg')" />
<area shape="rect" coords="147,59,205,92" href="#" onclick="showImage('D.jpg')" />
<area shape="rect" coords="61,92,121,125" href="#" onclick="showImage('E.jpg')" />
<area shape="rect" coords="146,96,205,128" href="#" onclick="showImage('F.jpg')" />
<area shape="rect" coords="60,128,122,163" href="#" onclick="showImage('G.jpg')" />
<area shape="rect" coords="146,131,204,164" href="#" onclick="showImage('I.jpg')" />
</map>
</div>
<div>
<img id="mainImage" src="A.jpg" />
</div>
</body>
</html>