我有一个Google地图放置在一个
里面,我想默认情况下将其隐藏
<div id="newpost" style="display:none;">
当地图未显示时,其中的一部分没有渲染出来。 我猜我必须在提交表单时重新加载地图。 有人知道如何做吗?
谢谢!
以下是我的代码:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('#newcatchhide').live('click', function(event) {
jQuery('#newpost').toggle('show');
});
});
这是在body标签上的地图oad功能:
<body onload="load()" onunload="GUnload()">
这里是被切换的div和包含地图的div:
<div id="newpost" style="display:none;">
<div id="map" style="width: 500px; height: 300px"></div>