Try this:
$("a", "#links").hover(
function () {
var state = $( this ).text();
$( 'area[state="' + state +'"]').mapster('select');
});
This is an event which gets active when you hover the link list with the id="links"
. The var state holds the text of the hovered link, so when you hover <a href="ab.com">ab</a>
, state is ab
. With the selector $('area[state="' + state +'"]')
you can find the area element of the map with the state attribute which equals the text of the hovered link. mapster('select')
finally highlights the map area.