隐藏/显示Div(jQuery) [英] Hiding/Showing Divs (jQuery)

查看:99
本文介绍了隐藏/显示Div(jQuery)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有这个演示: http://jsfiddle.net/SO_AMK/BcFVv/



我试图一次只显示1个Div,而不是全部三个。我想要它,因此某个div只会在按下itss按钮时才显示。



正如您所看到的,它显示了所有Div的开始。按钮工作正常。



问题:如何从一开始就隐藏Div 2和Div 3?

解决方案


ID和NAME标记必须以字母([A-Za-z])开头。 ([0-9]),连字符( - ),下划线(_),冒号(:)和句号(。)。 (W3C)

Hi I have this Demo: http://jsfiddle.net/SO_AMK/BcFVv/

I am trying to show only 1 Div at a time instead of all three. I want it so a certain div will only show when itss button is pressed.

As you can see it shows all of the Divs at the start. The buttons work fine.

QUESTION: How do I hide Divs 2 and 3 from the start?

解决方案

ID's should be named with a leading letter before the digit.

"ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")." (W3C)

这篇关于隐藏/显示Div(jQuery)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆