I have a JQVMap setup as follows:
jQuery('#vmap').vectorMap({ map: 'usa_en', enableZoom: true, showTooltip: true, selectedRegion: 'MO', onRegionClick: function(element, code, region) { var message = 'You clicked "' + region + '" which has the code: ' + code.toUpperCase(); alert(message); }, });
When I click on any state, I get a status warning as above, but I also get a JS error in the console:
regionClickEvent not defined
This is the line if (!regionClickEvent.isDefaultPrevented()) { in the JQVMap file that is causing the error. How can I get the state pressed without throwing this error?
jquery jqvmap
Hardcode
source share