监听的事件具体,这样不会联动
啦啦啦
- 啦啦啦
- 啦啦啦
- 啦啦啦
哦哦哦
- 啦啦啦
- 啦啦啦
- 啦啦啦
li {
list-style: none;
}
.active {
color: blue;
}
.activee {
color: red;
}
.three {
display: none;
}
主要代码内容
$('.two>a').click(function () {
$(this).parent().addClass('active').siblings().removeClass('active');
var three = $(this).parent().find('ul');
if (three.css('display') == 'none') {
three.show();
}else {
three.hide();
}
});
$('.five').click(function (){
$(this).addClass('activee').siblings().removeClass('activee');
})