I've been having trouble with just the map area and the calendar piece of my website. But more focused on the map piece. The map does not want to load properly or won't load at all in the second tab of my jquery tabs. I need help, I think I may be missing just a small part of the code but here's the script. Please help me...
<script>
$(function() {
$( "#tabs1, #tabs2" ).tabs(
{
show: function(event, ui){
// check if is "mappanel" and "map" is empty
if (ui.panel.id == 'mappanel' && $('#map').is(':empty'))
{
// load map
var myOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), myOptions);
collapsible: true }
}
});
});
</script>
<!-- ******** Tabs 1******************************************** -->
<div id="tabs1" style="width:615px" style="height:450px" style="vertical-align:top">
<ul>
<li><a href="#tabs-1">Photos</a></li>
<li><a href="#tabs-2">Location</a></li>
<li><a href="#tabs-3">Availability</a></li>
</ul>
<!-- ******** Photos ******************************************** -->
<div id="tabs-1">
</div>
<!-- ******** Photos End ******************************************** -->
<!-- ******** Location ******************************************** -->
<div id="tabs-2">
<?php
if($this->gmap_OK == 1): ?>
<!--<div class="kr_sidecol_header" align="center">
<?php echo JText::_( 'COM_KOPARENT_LOCATION'); ?>
</div>-->
<div id="map">
<div id="map_canvas" style="height: <?php echo $this->tab_height; ?>px;"></div>
</div> <?php
endif;
?>
</div>
<!-- ******** Location End ******************************************** -->
<!-- ******** Availability ******************************************** -->
<div id="tabs-3">
</div>
<!-- ******** Availability End ******************************************** -->
</div>
<!-- ******** Tabs 1 End ******************************************** -->