bkirish
08 Apr 2010, 07:35 PM
I am building a website and have an issue that is driving me NUTS!
I have set an image swap on the page when the viewer hovers over a link using the following code:
<a href="" onClick="document.main.src='image.png';">image swap text
</a>
It is functioning to swap the image , but ONLY on the moment of the click. Afterward, the original image comes back onscreen. I would like to make it so that the new image stays unless a different image swap link is clicked. I know you can succeed in doing this using another div and adding an image swap behavior, but I would prefer to have the text link work as desired. Anyone have a solution?
I have set an image swap on the page when the viewer hovers over a link using the following code:
<a href="" onClick="document.main.src='image.png';">image swap text
</a>
It is functioning to swap the image , but ONLY on the moment of the click. Afterward, the original image comes back onscreen. I would like to make it so that the new image stays unless a different image swap link is clicked. I know you can succeed in doing this using another div and adding an image swap behavior, but I would prefer to have the text link work as desired. Anyone have a solution?