【发布时间】:2016-12-27 19:28:31
【问题描述】:
我想知道是否有人知道我如何使地图下方的“链接”与地图交互(见下图)。
假设我想点击 George.. 地图中的信息框应该是可见的。如果我点击另一个,那么那个应该是可见的,等等。
带有链接的 HTML:
<ul>
<li><a>George</a></li>
<li><a>Hoppe</a></li>
<li><a>Café Herengracht</a></li>
</ul>
来自信息框的 HTML:
<div>
<div class="infoBox"></div>
// here comes another infobox (when clicked on icon)
// here comes another infobox (when clicked on icon)
// here comes another infobox (when clicked on icon)
// etc..
</div>
其他信息框现在不在 DOM 中.. 仅当您在地图中单击它们时!
我不知道在哪里可以找到 javascript,如果我知道我认为我不会识别使信息框出现在 DOM 中的函数。
我在 Avade Wordpress 主题中使用此地图简码: https://avada.theme-fusion.com/google-maps/
谢谢!
【问题讨论】:
标签: javascript html wordpress google-maps maps