问题
I am using infobox to display some data related to the marker. The data contains html code and in particular a div with a class test
.
The weird thing is that I cannot seem to access this html code, as the following code does not work:
$(".test").live("hover", function(){
alert("hover");
});
I am stressing the fact that the exact code works fine with InfoWindow. I can also confirm that the the complete html shows up, as I can see it using FireBug.
I know that live()
has been depreciated but I am using and older jQuery version.
Can anyone help please?
回答1:
Got it!
I had to set enableEventPropagation: true in the InfoBox options.
Thanks!
来源:https://stackoverflow.com/questions/13944058/google-maps-infobox-and-jquery