I’m adding images into ‘svg’ object with JavaScript and then assign ‘onclick’ event handler for each of them:
var svgMap = $("#map").get(0);
$($('polygon'), svgMap)
.bind('click', tileClicked2)
Here ‘#map’ is my svg-object.
In my event handler I can work with object clicked:
function tileClicked2(evt) {
$(this).attr('fill', 'black');
}
But what is ‘evt’ parameter that is passed into handler? I’ve tried to investigate if it can be useful, but can’t find anything…
Please help.
Thanks
In this case it is jQuery Event object
http://api.jquery.com/category/events/event-object/