With Google Map v2, I would like to be able to trigger a function when clicking a text in the InfoWindow of a GMarker.
$(".foo").click(myFunction);
...
marker.openInfoWindowHtml("<span class=\"foo\">myText</span>");
does not work. Why the event isn't caught inside the InfoWindow ?
I couldnt get it working like Kevin Gorski explained...
with jquery 1.9.1 and maps api v=3.exp the following works:
infowindow.setContent('<a href="#" id="test">test</a>');
google.maps.event.addDomListener(infowindow, 'domready', function() {
$('#test').click(function() {
alert("Hello World");
});
});