Board Thread:Support Requests - Getting Technical/@comment-195370-20170818114523

I've created Template:MapHover, based on this post.

As instructed, I've added the code to Common.js, it's gone live, I've refreshed the cache. I've added the code to Common.css. I've built the template. I also happily dealt with a more-complex-than-I-thought z-index issue where icons on the page would appear above the popup. It now works perfectly!

Except... You can see from the examples on Template:MapHover that what's happening is that the image defined in the  to appear on hover ("imagehover") appears fine, but if the template is called a second time in the same page, the second imagehover is displayed directly on top of the first, and both appear simultaneously when either of the base "linkhover" images are hovered over.

So I added in an "id" parameter into both the and the  (the latter id automatically appended with -tooltip) so that when the template is called, it has a unique id in the hope that would prevent multiple instances of the template from being conflated. But it's changed not a thing!

Any ideas if it's possible to get this working? I've tried searching for a few hours, but I've come up empty-handed, so clearly I don't know what I need to be searching for! 