7.1.7 对类样式的操作
$(function(){
var isShow=true;
$('#btn').click(function(){
// 1. 通过控制类样式属性对盒子显示隐藏
if (isShow){
$('.box').css('display','none');
isShow=false;
$(this).text("显示");
}else{
$('.box').css('display','block');
isShow=true;
$(this).text("隐藏");
}
2. 通过控制类名 addClass() removeClass()
})
})