废话不多说,直接上代码
$(".nav-item-has-subnav").click(function(){
if($(this).children(".nav-subnav").css("display")==='block'){
$(this).children(".nav-subnav").css("display","none");
}else{
$(this).children(".nav-subnav").css("display","block");
}
});
废话不多说,直接上代码
$(".nav-item-has-subnav").click(function(){
if($(this).children(".nav-subnav").css("display")==='block'){
$(this).children(".nav-subnav").css("display","none");
}else{
$(this).children(".nav-subnav").css("display","block");
}
});