jQuery fadeIn fadeOut点击 [英] jQuery fadeIn fadeOut with click

查看:191
本文介绍了jQuery fadeIn fadeOut点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图做一个div fadeIn当另一个div被点击和fadeOut再次当另一个div被点击(这将是关闭按钮),但我的代码不工作,我忘记了什么吗?



这里是CSS:

  body {
margin:0;
padding:0;
text-align:center;
background-color:#f0f2df;
}

#container {
border:solid 1px#f0f2df;
background-color:#f0f2df;
text-align:left;
margin:auto;
width:939px;
height:570px;
top:41px;
position:relative;
}
#contact_form {
display:none;
background-image:url(../ images / bg.png);
width:703px;
height:379px;
position:absolute;
left:236px;
bottom:34px;

}
.contact_close {
display:none;
background-image:url(../ images / close.png);
width:17px;
height:17px;
position:absolute;
right:5px;
top:135px;
}

HTML:

 <!DOCTYPE html PUBLIC -  // W3C // DTD XHTML 1.0 Transitional // ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1 -transitional.dtd> 
< html xmlns =http://www.w3.org/1999/xhtml>
< head>
< meta http-equiv =Content-Typecontent =text / html; charset = UTF-8/>
< link rel =stylesheettype =text / csshref =css / main.css/>
< title> test< / title>
&
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆