score:2

You can use JQuery "done:function" and specify on("click") as below :

 done: function(datamap) {
        datamap.svg.selectAll('.datamaps-subunit').on('click', function(geography) {
            alert(geography.properties.name);
        });
    }

Refer to https://github.com/markmarkoh/datamaps for further detail.

score:2

You'll need both the done call back as well as the updateChoropleth function. For example, to turn each country black you would do:

done: function(datamap) {
  datamap.svg.selectAll('.datamaps-subunit').on('click', function(geography) {
      var m = {};
      m[geography.id] = '#000000';
      datamap.updateChoropleth(m);
  });
}

Related Query

More Query from same tag