Comments

jessehs’s picture

Anyone figure this one out? I'm having the same issue, except I'm using a .hover() function. It doesn't work when the jquery is put in the (document).ready(function). I'm using a .js file loaded using drupal_add_js('path','theme').

maedi’s picture

Subscribing

tolstoydotcom’s picture

Issue summary: View changes

I gave up looking for whether there was a right way to do this and made this change to marker.js (in D7) after the jQuery.get call:

google.maps.event.addListener( infowindow, 'domready', function() {
	Drupal.attachBehaviors( '#node-' + marker.rmt );
});

That assumes that you're loading a node, that the id is like "node-5", and that marker.rmt (set through Views) is the nid.

(I was going to create my own version of marker.js, but Drupal.gmap lacks a removeHandler function to go with the addHandler function, so using my own version resulted in two AJAX calls).