elevateweb / elevatezoom

1.02k stars 493 forks source link

elevatezoom not working when used inside an infowindow (google maps js v3) #169

Open AnixPasBesoin opened 6 years ago

AnixPasBesoin commented 6 years ago

I've got a code that generates the content of an infowindow dynamically, and one of the dom generated dom elements is meant to be a zoomable image. In its basic form, the code looks like this:

    var infowindow = new google.maps.InfoWindow({
        content: html // The dynamically generated html which contains the infowindow
    });
    google.maps.event.addListener(infowindow, 'domready', function () {
        $(".ZoomableImage").elevateZoom();
    });
    return infowindow;

For some reason I didn't figure out, the zoomable image is not being elevated (nothing happens to the image). Have anyone encountered this before? If yes, I'd like to know your workaround.