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);
...
marke
If the event binding call is called before the call to openInfoWindowHtml as it is in your example, the span wasn't in the DOM while the first call was looking for elements with the class "foo," so no handler was attached.
You can either move that event handler to be called after openInfoWindowHtml, or use "live" event binding so that jQuery will monitor the DOM for any new elements with the given selector.
$(".foo").live('click', myFunction);