试图在响应时突出显示图像地图区域

Trying to highlight image map areas while beeing responsive

本文关键字:显示图 显示 图像 地图 区域 响应      更新时间:2023-09-26

我设法修复了它,但我必须在响应或突出显示悬停区域地图之间做出选择。这是代码,如果我设置class="map"然后我得到悬停效果和松散的响应!!什么好主意吗?

<p>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="templates/it_zen/assets/js/jquery.maphilight.js" type="text/javascript"></script>
<script type="text/javascript">// <![CDATA[
$(function() {
        $('.map').maphilight();
});
// ]]></script>
<script src="templates/it_zen/assets/js/imageMapResizer.min.js" type="text/javascript"></script>
</p>
<hr />
<h3 style="text-align: center;">All the EY+ routes</h3>
<hr />
<h5 style="text-align: center;"> Start exploring by clicking on each frame</h5>
<div>
<div>
<p><img class="" /*if set class="map" i loose responsive */ src="images/Maps/xartis_genikos.png" alt="" usemap="#map" width="2995" height="2264" border="0" /> <map name="map"> <!-- #$-:Image map file created by GIMP Image Map plug-in --> <!-- #$-:GIMP Image Map plug-in by Maurits Rijk --> <!-- #$-:Please do not edit lines starting with "#$" --> <!-- #$VERSION:2.3 --> <!-- #$AUTHOR:user --> 
<area coords="184,107,1241,1260" shape="rect" href="ey-routes/epirus-paxus" />
 
<area coords="911,1171,1540,1811" shape="rect" href="ey-routes/east-ionian" />
 
<area coords="525,941,1581,2097" shape="rect" href="ey-routes/kefalonia-ithaca" />
 
<area coords="2039,1453,2919,2107" shape="rect" href="ey-routes/korinthian-gulf" />
 </map>
<script>// <![CDATA[
imageMapResize();
// ]]></script>
</p>
</div>
</div>

在Joomla模板中插入Java Script文件的正确方法是:

$doc->addScript($tpath.'https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'); // if necessary
$doc->addScript($tpath.'/js/jquery.maphilight.js');

从我读到的,这段代码照亮了地图,但没有使它响应。

尝试改变$符号和jQuery单词之间的函数调用