I have a map with Jqvmap plugin, and if we want to select a region by its code, we do:
$('#vmap').vectorMap('set', 'colors', {us: '#ffffff'});
$('#vmap').vectorMap('set', 'colors', {fr: '#ffffff'});
...
But when this code comes from a variable, I do not know how to do:
$('#table td').click(function(){
var dpt = $(this).text();
$('#vmap').vectorMap('set', 'colors', {dpt: '#ffffff'});
});