Google Maps Infobox and jQuery

I use the info box to display some data related to the marker. The data contains html code and, in particular, a div with the test class.

It is strange that I can not access this html code, because the following code does not work:

  $(".test").live("hover", function(){ alert("hover"); }); 

I emphasize the fact that the exact code works fine with InfoWindow. I can also confirm that full html is being displayed, as I see it with FireBug.

I know that live() depreciated, but I am using the old version of jQuery as well.

Can anyone help?

0
source share
1 answer

Got it!

I needed to set enableEventPropagation: true in the InfoBox parameters.

Thanks!

+1
source

Source: https://habr.com/ru/post/1485619/


All Articles