先隐藏在字段里写style="display:none"
点击显示隐藏
$(".a").click(function(){
if($("#aa").css("display")=="none"){
$("#aa").show();
}else{
$("#aa").hide();
}
});
替换属性
先设置好class名字
$("#btn2").attr("class","c_btn_li");
.act{
background: rgba(11,93,181,1);
border: 1px solid #0b5db5;
color: #00fffd;
line-height:28px;
text-align:center;
68px;
height: 28px;
border-radius: 2px;
float: left;
display: inline-block;
margin: 5px;
}
.c_btn_li{
line-height:28px;
text-align:center;
68px;
height: 28px;
border-radius: 2px;
background: rgba(11,93,181,0.3);
border: 1px solid #0b5db5;
color: #1a8589;
float: left;
display: inline-block;
margin: 5px;
}