开发者

Google maps infowindow not showing the tabs as it should

i had the info windows showing the tabs just fine a few weeks ago.. and now its not showing anymore...

In fact the code uses JQuery.. find the codes on this link http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/infowindow/tabs.html?r=78

I have included all the libraries of JQuery includin开发者_开发技巧g the CSS files.. what is wrong?... what puzzles me is that it was working for quite a while and suddenly stopped..what actually happened??

Any help would be appreciated:)


Just a friendly "Thank You" to cdru who supplied the solution above.

google.maps.event.addListener(infowindow, 'domready', function () { 
        $("#tabs").tabs();

This will fire the jQuery tabs method when the infoWindow is built !!!

Now, onto the next problem with sizing the infoWindow and removing the div scrollbars showing inside it.

Very nice, LA Guy


If you haven't figured it out yet, or for others that might be having the same issue...

It appears to be a timing issue. $("#tabs").tabs() is being called prior to the tabs elements being created/visible/whatever. Activate the tabs by adding an event listener to "domready" which is fired once the content is actually added to the DOM.

google.maps.event.addListener(marker, 'click', function () {
    infowindow.open(map, marker);

    google.maps.event.addListener(infowindow, 'domready', function () {
        $("#tabs").tabs();
    });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜