- Jan 8, 2006
- 836
- 0
- 0
Code:
<SCRIPT LANGUAGE=JavaScript>
function swapImage()
{
switch (intImage)
{
case 1:
$('IMG1').src = "images/front_cover.jpg"
intImage = 2
return(false);
case 2:
$('IMG1').src ="images/back_cover.jpg"
intImage = 1
return(false);
}
}
</SCRIPT>
and then the html that calls this is:
Code:
<img id="IMG1" name="IMG1" onclick="swapImage();" src="images/front_cover.jpg" ...
whats wrong with this?