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

时间:2015-10-20 20:38:49

标签: javascript joomla imagemap

我设法解决了这个问题但是我必须在响应之间做出选择,或者在悬停时突出显示区域地图。 Thiw是代码,IF I SET 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>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

在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

之间的函数调用