OnRegionClick and event.preventDefault #99

LorenDorez opened this Issue Dec 5, 2013 · 3 comments


None yet

4 participants


Ho I am trying to prevent the clicking of certain states but it isnt working.

After further debugging this code always returns false


If i check this its true..


you have to define those state codes like this:

onRegionClick: function (element,code,region,event)
if (code == "tx" ||
code == "fl")


@sebastianherrera Good day to you. I'm having trouble implementing this for jqvmap's world map. The exact same logic works fine on my USA and Canada map, however for some reason the World map, event is undefined? Any ideas what's going on

For example:

onRegionClick: function(element,code,region,event)
alert(event); // Alerts "undefined", tells me it wasn't passed to the function
event.preventDefault(); // Throws error "Cannot read property 'preventDefault' of undefined.

Strangely enough, it does work for onRegionOver of the same map.

onRegionOver: function(event, code, region) {

@Leolik Leolik added a commit to Leolik/jqvmap that referenced this issue Oct 16, 2014
@Leolik Leolik #99 3beca2f

This issue has been resolved in the latest release ( v1.1.0 ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment