0
Revert the previous click after detecting a new click on an image file
I have 3 images (A,B,C) in a table. Each cell is overlap with a default image. When I press on the default image, it will display A. When I press on another default image, it will display B and revert back the default image on A. What method can I use?
3 Antworten
+ 3
Please show your code here so that we can help you
https://www.sololearn.com/post/75089/?ref=app
+ 1
SWL I think. This is about css not about js.
A {
position : absolute;
z-index : -1;
}
default image:hover {
opacity :0;
}
+ 1
Create a click event,
In the event function, firstly reset all img to default image, then set the selected image to destined image.
https://code.sololearn.com/W0MJIYm1xYKQ/?ref=app