I want an image to "turn" into another image when hovering. So, basically there is an image (image1.png) on a page, and when hovering it, it should simply show another imagine (image2.png) instead of the first one. I tried using this and it works perfectly well:
<img src='Image1.png' width='100' height='100'
onmouseover="this.src='Image2.png';"
onmouseout="this.src='Image1.png';" />
None of the images have links, that's why I didn't use any of the "a hover" solutions.
However, now I just realised that it will only work on computers and not on smart devices since they don't really have the hover function. But since the website has quite a few smart device users, it's really important that it works for them as well.
Is there some solution to that?
My JS skills are very limited, so I haven't been able to figure it out yet.
Thanks in advance for any help!