$(".a").css("display")=="none" ?$(".a").css("display","block"):$(".a").css("display","none");
$(".b").css("display")=="none" ?$(".b").css("display","block"):$(".b").css("display","none");
缩写为:
$(".a,.b").toggle();
$(".a").css("display")=="none" ?$(".a").css("display","block"):$(".a").css("display","none");
$(".b").css("display")=="none" ?$(".b").css("display","block"):$(".b").css("display","none");
缩写为:
$(".a,.b").toggle();