I want to display some animation on infoWindow in google maps with jQuery.
var infoWindow = new google.maps.InfoWindow({
content: contentString
});
google.maps.event.addListener(marker, 'click', function(){
infoWindow.open(map, marker);
setTimeout(animation, 1000);
});
animation() has to get element by its id on infoWindow, so the infoWindow must finish loading before animation() is executed.
How can I execute animation() immediately afer infoWindow finish loading instead of waiting 1 second every time?
1 Answer