UPDATE: I am amazed by the quick responses, this is my first time using this platform. Thank you to everyone who helped out. The person who provided the answer understood exactly what I was looking for. To others who responded, thank you as well.
I need help adding a link to an image that changes when hovered over. I want the image to switch to another image with a link attached. Can anyone assist me?
HTML
<img src="don.png" class="artist" onmouseover="hover(this);" onmouseout="unhover(this);" a href="https://privatelink.com"/>
JS
function hover(element) {
element.setAttribute('src', 'ht.png');
}
function unhover(element) {
element.setAttribute('src', 'don.png');
}