I currently have 3 <a>
tags within my html, each containing 2 images. Specifically, the greyscale images are the ones that are visible while the colored ones are set to display:none.
I am aiming to achieve a functionality where upon hovering over the greyscale image, it will be hidden and the colored image will appear. Conversely, when not hovering, the colored image should be hidden again. How can I accomplish this using jquery?
<a class="mylink" href="">
<img src="img/thumbnails/colored-1.jpg" class="color-image"/>
<img src="img/thumbnails/greyscale-1.jpg" class="greyscale-image"/>
</a>
<a class="mylink" href="">
<img src="img/thumbnails/colored-2.jpg" class="color-image"/>
<img src="img/thumbnails/greyscale-2.jpg" class="greyscale-image"/>
</a>
<a class="mylink" href="">
<img src="img/thumbnails/colored-3.jpg" class="color-image"/>
<img src="img/thumbnails/greyscale-3.jpg" class="greyscale-image"/>
</a>
.color-image {
display:none
}