jquery - 如何显示一个隐藏的div [英] jquery - how to show a hidden div
本文介绍了jquery - 如何显示一个隐藏的div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的网页中嵌入了Google地图,其可见性设置为隐藏。使用一个按钮,我想在页面上显示地图。
我的代码 - (不工作)
< div id =mapstyle =height:350px; border:1px solid#979797; visibility =hidden;>< / div>
pre>
任何人都可以帮助我使用相关的jquery代码吗?
解决方案尝试
$('#map')。css('visibility','visible');
实际上,如果style的
display:none
,你可以使用jquery功能$('#map')。show();
I have a google map embedded in my page whose visiblity is set to hidden. Using a button i want to show the map on the page. Should be done using jquery.
my code - (not working)
<div id="map" style="height: 350px; border: 1px solid #979797;visibility="hidden";></div>
Anyone can help me with the related jquery codes?
解决方案Try
$('#map').css('visibility','visible');
Actually, if style has
display:none
, you can use jquery function$('#map').show();
这篇关于jquery - 如何显示一个隐藏的div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文