Click to See Complete Forum and Search --> : About overimg stay


lunanook
12-17-2002, 09:44 AM
hello!!! :D
I am looking for a code that will stay after clicking it... what i mean is

that I have two images one is example img.gif and the other imgOver.gif,
so when the mouse goes over img.gif it changes for imgOver.gif, but then when the user click on the image I want it to stay as imgOver.gif, because i have already visited that part of the site. So I was wondering :confused: how to do it with out layers.

thanx in advance :D

Luna

Sceiron
12-17-2002, 01:04 PM
You could use a cookie to store the IDs for each page they've visited, then put some conditional logic within your mouseovers and image source definitions to get the correct image showing up for each link. The code wouldn't be that complex, but I'm too lazy to write it for you (I'm bad, I know).

gil davis
12-17-2002, 01:38 PM
What about making your image a negative transparency? You could take advantage of the browser visited link action using CSS:

<style type="text/css">
a image {border: 0px; background-color: red}
a:visited image {boder: 0px; background-color: gray}
</style>

That way the browser remembers that you've been there.