Jquery .show()没有透露隐藏的可见性的div(Jquery .show() not revealing a div with visibility of hidden)

编程入门 行业动态 更新时间:2024-10-28 08:28:42
Jquery .show()没有透露隐藏的可见性的div(Jquery .show() not revealing a div with visibility of hidden)

基本的jQuery问题:

我试图透露一个使用jQuery标记为隐藏的div 。 但我不太明白

我在这里创建了一个JSFiddle: http : //jsfiddle.net/VwjxJ/

基本上,我想使用style="visibility: hidden;" 而不是style="display: none;" 因为我想要保留隐藏元素的空间

尝试使用show() , fadeIn()等,但都没有工作(他们为style="display: none;" )

我究竟做错了什么?

Basic jQuery question:

I am trying to reveal a div that has been marked as hidden using jQuery. But am not quite getting it

I've created a JSFiddle here: http://jsfiddle.net/VwjxJ/

Basically, I want to use style="visibility: hidden;" rather than style="display: none;" as I want the space of the hidden element to be maintained

Have tried using show(), fadeIn() etc but neither work (they do for style="display: none;")

what am I doing wrong?

最满意答案

如果你隐藏了它的visibility:hidden那么你可以用jQuery来显示它

$(".Deposit").css('visibility', 'visible');

在小提琴中你缺少jQuery。 这是一个演示: http : //jsfiddle.net/9Z6nt/20/

If you have hidden it with visibility:hidden then you can show it with jQuery by

$(".Deposit").css('visibility', 'visible');

And in the fiddle you are missing jQuery. Here is a demo: http://jsfiddle.net/9Z6nt/20/

更多推荐

本文发布于:2023-04-27 21:38:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1329021.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:见性   show   Jquery   div   hidden

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!