Search code examples
javascriptresponsive-designimagemap

jQuery responsive image maps: Uncaught TypeError


I am using this jquery plugin to make an image's image map responsive on this project.

However, I receive 2 Javascript console errors in Chrome:

> Uncaught TypeError: $(...).rwdImageMaps is not a function

I have added

<script type="text/javascript" src="http://www.tempertemper.com.au/test/wp-content/themes/temper/js/jquery.rwdImageMaps.js"></script>
<script>
    $(document).ready(function(e) {
        $('img[usemap]').rwdImageMaps();
    });
</script>

just before the closing </body> tag, as instructed, however, the console errors remain.

How do I resolve the console errors? Thanks.


Solution

  • You have attached Jquery twice. Remove the one at the header. And move the other above jq ui.