I am using the plugin jqvmap http://www.jqvmap.com/.
What I would like to do with my map is have a list of countries below it and do so that when someone hovers one of the listed countries, the matching county gets highlighted (ie.changes color) on the map.
An example of the result I would like to achieve is visible here: http://www.supermagnete.ch/eng/select_country.php?origin=conditions
Here, when a user hovers a country on the list, the matching country gets highlighted on the map. It goes both ways: when a user hovers a country on the map, it gets highlighted on the list.
Here is my HTML code so far:
<div id="vmap" style="width: 680px; height: 520px;"></div>
<div id="links"><ul><li><a href="CH" onclick="return false;">Switzerland</a></li><li><a href="FR" onclick="return false;">France</a></li></ul></div>
And this is how I initialized my map in jQuery:
jQuery(document).ready(function() {
jQuery('#vmap').vectorMap({
map: 'europe_en',
enableZoom: false,
showTooltip: true,
backgroundColor: '#cccccc'
});
});
But now I have no idea how to achieve this both-ways highlighting result. Does anyone have an idea?