I'm looking to disable my image map on mobile screens using media queries.
I've attempted to include some javascript
in the head of my html
file, but I encountered an error:
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script>
if($(window).width() < 1200){
/*document.getElementById("imgmap").removeAttribute("usemap");*/
document.getElementById("imgmap").setAttribute('usemap','disabled');
}
if($(window).width() > 1199){
document.getElementById("imgmap").setAttribute('usemap','#Map');
}
</script>
Here is the image map code:
<img class="bdg-homeimg" id="imgmap" src="http://www.chiantisculpturepark.it/newdesign/img/pievasciata.jpg" usemap="#Map">
<map name="Map" id="Map">
<area shape="rect" coords="90,100,140,120" title="massimoturato" href="massimoturato.htm" target="_blank" onclick="NewWindow(this.href,'name','612','530','no');return false" />
<!-- more area tags -->
</map>
And here is the error message I received:
ReferenceError: $ is not defined
I could use some assistance with this issue.