If you're using the usemap
attribute and the <map>
element to create a client-side image map, then you don't wrap the <img>
in an <a>
element (that's for server-side image maps) -- so the A()
helper (and its "callback" argument) is irrelevant here. Instead, you need to set up your own click handler for the map. Not tested, but maybe something like:
$('map').on('click', 'area', function(e) {
e.preventDefault();
var href = $(this).prop('href');
ajax(href, [], 'mytarget');
});