2015-10-20 132 views
-2

我设法解决它,但我必须选择响应或突出显示悬停区域地图。 Thiw是代码,如果我设置类=“地图”然后我得到悬停效果,并松动响应!有任何想法吗?试图突出显示图像地图区域,而beeing响应

<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>

+0

Java与javascript无关。 – ndugger

+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之间的函数调用

+0

它肯定是响应式的(我检查了各种设备和屏幕),但它没有照亮。也许在我安装在_template/assets/js/_文件夹中的“jquery.maphilight.js”中出现了错误。也许我可以把整个脚本写在里面而不是调用它,你怎么看?这怎么写呢?复制jquery.maphilight.js中的所有代码并将其粘贴到文章的jce编辑器中? –

+0

重新检查问题,我更改了代码,但有问题 –