My guess is that your jQuery is running before the org chart has drawn, so
the "a1" and "a2" divs don't exist yet. You should set up the jQuery
tooltips to initialize when the chart fires its ready event. Remove the
jQuery function that executes on page load and add this to your draw
function, between the chart object declaration and the draw call:
google.visualization.events.addListener(chart, 'ready', function() {
$('#A2').Tooltip({
delay: 0,
showURL: false,
bodyHandler: function() {
return $("<img/>").attr("src", this.src);
}
});
$('#A3').Tooltip({
delay: 0,
showURL: false,
bodyHandler: function() {
return $("<img/>").attr("src", this.src);
}
});
}
There are other issues with the code you posted, most of which I assume are
typos from typing out the code here (missing commas and periods mostly). I
suspect that your jQuery selector for image tags is invalid as well, but I
could be wrong about that. There could also be some conflicts with the
vizualization API's native tooltip functionality.
Is there some particular reason you want to use jQuery's tooltips instead of
the visualization API's?
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/2z-af2H91fsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.