I am dynamically generating markers and using the address spot to display information that is sometimes large. So I want to toggle the visibility with jQuery.
(incrementally looping $k)
$appointment_div = ”.$appointment_data.’Appt Notes’;
When the info window is displayed, the div has class appointment_notes_1, for instance, but jQuery cannot hide div.appointment_notes_1 but CSS can hide it.
Can you give advice?

Jquery is
jQuery( document ).ready(function() {

jQuery(“#appointment_click_1”).click(function () {

I tried to put the script directly into the marker data, but I think it’s being sanitized. Should I add my script to your maps.js?

Form submission here changed my code, but you probably understand. I'm dynamically assigning a class to the div, then using jQuery to hide that div and assigning jQuery to use the button to toggle the visibility of the div. This is a standard trick I use on other things, but it's failing inside the info window.
Okay never mind. I see the Google infowindow is not in the DOM until later, so I use "on" rather than "click" and it works.

Please login or Register to Submit Answer