I want to make an on hover display of my site products. My initial though was to use the show/hide jQuery function after that I though using arrays was my best bet but I have 0 knowledge off
When you hover any product it's array value is displayed below in a container with it's various info
This is the code I have for now:
<script>
function display() {
var imgArray = ["E11.png", "E11BIO.png", "E22-clear-2018.png", "E22BIO.png"];
}
</script>
<img src="E11.png" onHover="display();">
<img src="E11BIO.png" onHover="display();">
<img src="E22-clear-2018.png" onHover="display();">
<img src="E22BIO.png" onHover="display();">
<div class="display">
<img src="imgArray[i]" style="width:50px;">
</div>
I know my code is trash but it is only to illustrate my approach, I am working on making it more humanlike but my inexperience is stopping me for completing my task. Any related material code even tutorial on how to use arrays with html is appreciated. Thanks in advance