var flag=[0,0,0,0,0,0,0,0,0,0,0,0,0,0];
var span=document.getElementsByName("span");
for(var i=0;i<14;i++){
$("#span"+i).bind("click",function(){
alert(i);
if(flag[i]==0){
$("#ul_display"+i).css({"display":"block"});
flag[i]=1;
}
else{
$("#ul_display"+i).css({"display":"none"});
flag[i]=0;
}
});
}
相关分类