The Classic jQuery Tabs with Bing Maps Issue

Posted by Justin on Stack Overflow See other posts from Stack Overflow or by Justin
Published on 2011-03-04T02:28:09Z Indexed on 2011/03/04 7:24 UTC
Read the original article Hit count: 296

Hello, I know that there are multiple issues with jQuery Tabs and using Maps. And I have seen the multiple fixes and I am half-way there. But I have the most obscure issue and hoping that someone might understand why.

This is my code for the tabs

$("#contactTabs").tabs({ spinner: 'Loading <img src="../images/icons/ajax-loader.gif" />' });

$('#contactTabs').bind('tabsshow', function(event, ui) {
   if (ui.panel.id == "Map") {
   GetMap();
}
});

Which currently does not work. But I was doing some testing and added in an ALERT() to see if the "GetMap()" was even attempting to be loaded... so this was the code that I tested with, and it works just fine.

$("#contactTabs").tabs({ spinner: 'Loading <img src="../images/icons/ajax-loader.gif" />' });

$('#contactTabs').bind('tabsshow', function(event, ui) {
   if (ui.panel.id == "Map") {
   alert("load map");
   GetMap();
}
});

So I haven't a clue why adding the ALERT() causes the map to load and removing the ALERT just doesn't load the map at all.

Is there any clarification that someone can give me on this issue? Thank you in advance!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui