For the benefit of others who may find themselves with this issue,
I've found my solution..

Problems were related to using HTML and not a DOM node when creating
the InfoWindowTab.
Also when 'selecting' the node to pass to the InfoWindowTab, jquery
selector does not work whereas document.getElementById() does!

Heres the working ammendments....

var accHtml = "<div id='accordion' rel='accordion'>"
                accHtml += "<h3><a class='accordianMenuItem' 
href='#'>Stuff</a></
h3>";
                accHtml += "<div>stuff here</div>";
                accHtml += "<h3><a class='accordianMenuItem' href='#'>Other 
Stuff</
a></h3>";
                accHtml += "<div>other stuff here</div>";
                accHtml += "</div>";

          // clear existing elements within #accordionHolder and append
          // html
          $("#accordionHolder").empty().append(accHtml);
          // now the html is in our DOM, we can call jquery accordion to do
its magic

          $("div[rel^='accordion']").accordion({
         header: "h3"});
          // define tabs

      var infoTabs = [
                // bind the InfoWindowTab to the accordion element and not just
html.
                // note using getElementById as jquery's selector does not work
here
        new GInfoWindowTab("Media", document.getElementById
('accordion')),

                new GInfoWindowTab("Details", detailHtml),
        new GInfoWindowTab("Notes", notesHtml)
      ];

Hope that saves someone some time in the future..




On Nov 18, 4:56 pm, Dave Brown <[email protected]> wrote:
> Hi all,  I'm having a problem using jquery and and the infowindow.
> Hoping someone might have experience with this to identify the
> problem.
>
> To start with let me explain what i'm trying to do..   When the user
> clicks a marker, in the click event I am generating html for the
> infowindow. I'm also using the maps api info tabs and am trying to
> create a jquery accordian (html for the accordian is in a variable)
> that will appear on tab 2.
>
> I 'think' the issue is something to do with the time that the google
> maps api actually appends my tab html into the DOM, as in my test, I
> cannot even successfully interrogate the html i'm trying to add, as if
> it wasnt there at all.
>
> I've created a test page where the source shows what I'm trying to
> achieve and where the problem lies.. If anyone can give me a pointer
> here it would be greatly appreciated.
>
> The URL ishttp://www.dbws.net/map
> And the js function where the issue is is called displayInfo(marker);
>
> Thankyou in advance,
>
> Rgrds,
>
> Dave

--

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


Reply via email to