Skip to content


Subversion checkout URL

You can clone with
Download ZIP


OnRegionClick and event.preventDefault #99

LorenDorez opened this Issue · 3 comments

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 referenced this issue from a commit in Leolik/jqvmap
@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
Something went wrong with that request. Please try again.