Hope someone can help me out. Have spent days now trying to get this
running!
I am tying to bind a function to a link that is created dynamically in
the DOM when a Google Maps InfoWindow is fired. Specifically, getting
a JQuery Coda Slider 1.1.1 to work. You can see the test site here -
[click apply within an infowindow] http://tinyurl.com/coda-mapsv3-infowindow-test
I believe I have 2 options, neither of which i can figure out:
1. Google Maps JS V3 API fires the event DomReady when an infowindow
is opened: http://code.google.com/apis/maps/documentation/v3/reference.html#Info
Use JQuery Live to listen for the DomReady event (maybe a better,
lighter weight??) solution?
or
Add tb_init('a.cross-link'); within the
google.maps.event.addListener function - I have tried adding this
(after the infowindowOption variable) this but cant seem to get it to
bind?
Here is the listener function (Maps V3)
google.maps.event.addListener(marker, "click", function() {
var infowindowOptions = {
content: html
};
var infowindow = new google.maps.InfoWindow(infowindowOptions);
cm_setInfowindow(infowindow);
infowindow.open(map, marker);
marker.setIcon(markerImageOut);
});
google.maps.event.addListener(marker, "mouseover", function() {
marker.setIcon(markerImageOver);
});
google.maps.event.addListener(marker, "mouseout", function() {
marker.setIcon(markerImageOut);
});
return marker;
}
Can anyone help. Please!
Many thanks
Benji
No comments:
Post a Comment