So what I'm trying to make is a map of Germany
with markers.
and when clicked on a marker a div
(content)
will show with some things in it
is there a way to let JavaScript
know which marker I clicked and it will open the corresponding content div, in total it will be about 200 markers so it must be a decently efficient code and my knowledge about JavaScript
is not that great
this is the code I have for now
<div class="map">
<img src="/images/map.jpg">
</div>
<div class="markers" style="top: 60%; left: 35%;">
<div class="content" style="display: none;">
<h1>Test</h1>
<p>test</p>
</div>
</div>
<div class="markers" style="top: 20%; left: 60%;">
<div class="content" style="display: none;">
<h1>Test2</h1>
<p>test2</p>
</div>
</div>
question from:
https://stackoverflow.com/questions/65938499/javascript-popup 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…