I\'m writing a mock up (using HTML, JS/jQuery) and CSS for a client which involves having a single image (of an interface) with an Map applied to it. For reasons I won\'t ex
There are different approaches. I guess the easiest would be this one:
$("map[name=claas_ipad3] area").live('click', function () {
alert($(this).attr('id'));
});
Note that as of jQuery 1.7, the .live() method is deprecated and you should use .on() to attach event handlers:
$("map[name=claas_ipad3] area").on('click', function () {
alert($(this).attr('id'));
});