-2

I managed to fix it but i have to choose between being responsive or highlight the area map on hover. Thiw is the code, IF I SET class="map" then i get the hover effect and loose the responsive!!! Any ideas?

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

1 Answers1

0

The correct way to insert a Java Script file in the Joomla template is:

$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');

From what I've read, this code, illuminate the map but does not make it responsive.

Try changing the function calls between the $ symbol and the word jQuery

Jose Luis Algara
  • 175
  • 4
  • 15
  • It is surely responsive (i checked in various devices and screens) , it doesnt illuminates though. Maybe is something wrong in the "jquery.maphilight.js" i ve installed in the _template/assets/js/_ folder. Maybe i can write the whole script inside instead of calling it , what do you think? And how can this be writen ? copy all the code inside the jquery.maphilight.js and pasting it inside the jce editor of the article? – EYplus Sailing Oct 21 '15 at 14:09
  • recheck the question , i changed the code but has issues – EYplus Sailing Oct 22 '15 at 02:23