I have a gallery of images that I wish to animate on every mouseover, so I’ve implemented the following code into my site:
[CODE]<script language=”JavaScript”>
<!–
function flip( name, url )
{name.src = url;}
//–>
</script>
And then, for the img tag:
[CODE]
<img src=”../images/bh/chrish_00.gif” name=”home” onmouseover=”flip(home, ‘../images/bh/chrish_ani.gif’)” border=”0″>
Now, in FF and IE, this works as intended: The image is stationary until a mouseover, which is when the animation plays to completion, and any mouseover after the animation is complete will restart it.
In Opera, however, the image stays on the last frame of the animated gif, and doesn’t reset. I do not wish to stop the animation on a mouseout, so I’m not sure what event I can use to tell Opera to go back to the first image.
Any help?