Andrej229 Andrej229 - 1 month ago 13
HTML Question

Image map resizer doesn't work

I want to use image map resizer on my website but there is something wrong. I'm maping image in my header. I'm using this code:

<script type="text/javascript" src="http://davidjbradshaw.com/imagemap-resizer/js/imageMapResizer.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('map').imageMapResize();
});
</script>


And my map:

<img src="link_to_image" usemap="#map" width="100%" />
<map name="map">
<area target="" alt="" title="" href="http://nowa.cwr-poznan.pl/" coords="124,152,109" shape="circle">
</map>


What is wrong?

Answer

You have a lot of scripts on there. Try to avoid a potential conflict by changing your on ready to this format and see if that was the issue:

jQuery(function($) {
    $('map').imageMapResize();
});
Comments