Note that there are some explanatory texts on larger screens.

plurals
  1. POadding jscrollpane to a google maps infowindow
    text
    copied!<p>so it's basically all in the title... I'm using jscrollpane elsewhere on the page so I know it works, but I can't get anything besides the default scrollbars on the google maps infowindow. some code:</p> <pre><code>PanelList = function(speed, target) { // jscrollpane is working on this.speed = speed || 300; // these panels next to the google map this.target = target || '#panel-target'; this.array = []; $('.scrollpane').jScrollPane({autoReinitialise: true}); this.scrollAPI = $(this.target).data('jsp'); } // ... lots of code left out for brevity MarkerList = function(map) { this.map = map; this.array = []; this.infoWindow = new google.maps.InfoWindow(); this.savedBounds = new google.maps.LatLngBounds(); var cachedThis = this; google.maps.event.addListener(map, 'click', function() { cachedThis.infoWindow.close(); }); } MarkerList.prototype = { makeInfoWindow: function(map, marker) { this.infoWindow.setContent('&lt;div class="infowindow scrollpane"&gt;' +'&lt;h2&gt;'+marker.title+'&lt;/h2&gt;' +marker.content +'&lt;/div&gt;'); this.infoWindow.open(map, marker); // assume I should add some jscrollpane code here // but nothing seems to work }, </code></pre> <p>Seems like the problem is maybe a) jscrollpane is initialized before the infowindow is created, b) I'm targeting a child element of the infowindow when I need to target something higher up, or c) the gmaps API is just not playing nice with jscrollpane and there's nothing I can do. But I really have no idea.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload