I think that should work, but $('#my_div') should probably be
$('#my_div').html()

On Tue, Feb 2, 2010 at 4:51 PM, Ben Appleton <[email protected]> wrote:

> What happens if you forward your div, not your div's html, as the
> InfoWindow's content?  That is, write:
>
> infowindow = new google.maps.InfoWindow({content: $("#my_div")});
>
> On Wed, Feb 3, 2010 at 2:58 AM, koichirose <[email protected]> wrote:
> > Hello, I'm trying to use existing divs in my html source as
> > infowindows (instead of default ones).
> >
> > I know I can set the content to whatever I want by doing:
> > infowindow = new google.maps.InfoWindow({content: $("#my_div").html
> > ()}); //this uses jquery;
> >
> > but I want to style the infowindow itself as an existing div on my
> > page (which is, of course, hidden).
> >
> > All the examples I found create and style the div dinamically with
> > javascript, while my div is already created via php+html+css and I
> > just want to display it when I click on a marker.
> >
> > Is there a way to do this? How?
> >
> > Thank you!
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> > To post to this group, send email to
> [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
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-maps-js-api-v3?hl=en.

Reply via email to