I have problem with google map when I use jQuery tabs - I see only small part of the map in one of the tabs I search for answer here and found post that says to add script. I added it without any luck
How can I fix it?
$(document).ready(function(){
$("a.tab").click(function () {
$(".active").removeClass("active");
$(this).addClass("active");
$(".tab_block").slideUp();
var content_show = $(this).attr("title");
$("#"+content_show).slideDown();
});
});
/// addon script: ////
$(function(){
$('#maptab').bind('click',function() {
var w = $('#map_view').width();
var h = $('#map_view').height();
$('#map').css({ width: w, height: h });
google.maps.event.trigger(map, 'resize');
});
});
TABS CODE:
<ul class="tabs">
<li><a href="#" title="content_4" class="tab" id="maptab">MAP</a></li>
<li><a href="#" title="content_5" class="tab ">tab 5</a></li>
</ul>
<div id="content_4" class="tab_block">
MAP SCRIPTS GOES HERE...
<div id='map'></div>
</div>