On a wordpress mega menu, I want to show the product image on a different div when the mouse hovering a link. I work with the ubermenu plugin
I find a html+javascript code that work fine, but only when the ubermenu is implant by adding a shortcode on a page (exemple here : https://defil-communication.com/test-accueil/). The second menu work fine but the main menu don't.
Here is the code I added :
To all the product link
<a href="https://my-product/" onmouseover="document.getElementById('image').src = 'my-image-1.jpg'">Beach Flag Crest</a>
To the div appears on fith column
<img id="image" src="https://my-image-2.jpg" alt="image0" />
Do I have to declare the javascript somewhere ?
Thanks four your help