导航:首页 > 源码编译 > jquery手风琴源码

jquery手风琴源码

发布时间:2023-02-24 01:45:14

① 高分求jquery 手风琴效果实现代码

<style>
*,body,ul,li,a,h2{ margin:0; padding:0; list-style:none;}
body{font:12px "宋体"; padding-top:20px;}
#menu { width:211px; height:100%; float:left; margin-left:22px; margin-left:11px; margin-top:10px; margin-bottom:10px; _padding-bottom:10px; overflow:hidden;}
#menu a { cursor:pointer; width:211px; height:31px; float:left; padding-left:50px; background:url(../App_Themes/images/itemBg.jpg) no-repeat left top; color: #000000; cursor: pointer; font-weight:normal; font-size: 12px; line-height:31px; margin-top:2px; position:relative;}
#menu a:hover { cursor:pointer; width:211px; height:31px; float:left; padding-left:50px; background:url(../App_Themes/images/typeBg.jpg) no-repeat left top; color: #ffffff; cursor: pointer; font-weight:normal; font-size: 12px; line-height:31px; margin-top:2px; position:relative;}

#menu h2 { cursor:pointer; width:211px; height:31px; float:left; padding-left:50px; background:url(../App_Themes/images/type_sec.jpg) no-repeat left top; color: #db5901; cursor: pointer; font-weight:normal; font-size: 12px; line-height:31px; margin-top:2px; position:relative;}
#menu h2:hover { cursor:pointer; width:211px; height:31px; float:left; padding-left:50px; color: #333333; cursor: pointer; font-weight:normal; font-size: 12px; line-height:31px; margin-top:2px; position:relative;}

#menu a.navhov { cursor:pointer; width:211px; height:31px; float:left; padding-left:50px; background:url(../App_Themes/images/typeBg.jpg) no-repeat left top; color: #ffffff; cursor: pointer; font-weight:normal; font-size: 12px; line-height:31px; margin-top:2px; position:relative;}

.no { display:none;}
.type_prod_title{width:234px; height:26px; background-color:#4c4c4c; text-align:center; font-size:12px; color:White; line-height:26px; font-weight:normal; float:left; overflow:hidden;}
</style>
<div class="type_prod_con">
<div class="type_prod_title">
产品专区</div>
<div id="menu">
<a onclick="javascript:ShowMenu(this,'NO0')">实木地板系列</a>
<span id="NO0" class="no">
<h2 onclick="javascript:ShowMenu(this,'NO00')">
实木地板名称</h2>
<h2 onclick="javascript:ShowMenu(this,'NO01')">
实木地板名称</h2>
<h2 onclick="javascript:ShowMenu(this,'NO02')">
实木地板名称</h2>
<h2 onclick="javascript:ShowMenu(this,'NO03')">
实木地板名称</h2>
</span>
<a onclick="javascript:ShowMenu(this,'NO1')">实木门系列</a> <span id="NO1" class="no">
<h2 onclick="javascript:ShowMenu(this,'NO10')">
实木门名称</h2>
<h2 onclick="javascript:ShowMenu(this,'NO11')">
实木门名称</h2>
</span><a onclick="javascript:ShowMenu(this,'NO2')">板式家具系列</a> <span id="NO2" class="no">
<h2 onclick="javascript:ShowMenu(this,'NO20')">
三级菜单C_1</h2>
<h2 onclick="javascript:ShowMenu(this,'NO21')">
三级菜单C_2</h2>
</span><a onclick="javascript:ShowMenu(this,'NO3')">软床系列</a> <span id="NO3" class="no">
<h2 onclick="javascript:ShowMenu(this,'NO30')">
四级菜单D_1</h2>
<h2 onclick="javascript:ShowMenu(this,'NO31')">
四级菜单D_2</h2>
</span><a onclick="javascript:ShowMenu(this,'NO4')">沙发系列</a> <span id="Span1" class="no">
<h2 onclick="javascript:ShowMenu(this,'NO40')">
四级菜单D_1</h2>
<h2 onclick="javascript:ShowMenu(this,'NO41')">
四级菜单D_2</h2>
</span><a onclick="javascript:ShowMenu(this,'NO5')">饰品系列</a> <span id="Span2" class="no">
<h2 onclick="javascript:ShowMenu(this,'NO50')">
四级菜单D_1</h2>
<h2 onclick="javascript:ShowMenu(this,'NO351')">
四级菜单D_2</h2>
</span>
</div>
</div>

<script language="JavaScript">
<!--//
function ShowMenu(obj,noid){
var block = document.getElementById(noid);
var n = noid.substr(noid.length-1);
if(noid.length==4){
var ul = document.getElementById(noid.substring(0,3)).getElementsByTagName("ul");
var h2 = document.getElementById(noid.substring(0,3)).getElementsByTagName("h2");
for(var i=0; i<h2.length;i++){
//h2[i].innerHTML = h2[i].innerHTML.replace("+","-");
h2[i].style.color = "";
}
obj.style.color = "#db5901";
for(var i=0; i<ul.length; i++){if(i!=n){ul[i].className = "no";}}
}else{
var span = document.getElementById("menu").getElementsByTagName("span");
var h1 = document.getElementById("menu").getElementsByTagName("h1");
for(var i=0; i<h1.length;i++){
h2[i].innerHTML = h1[i].innerHTML.replace("+","-");
h2[i].style.color = "";
}

obj.style.color = "#ffffff";
for(var i=0; i<span.length; i++){if(i!=n){span[i].className = "no";}}
}
if(block.className == "no"){
block.className = "";
obj.innerHTML = obj.innerHTML.replace("-","+");
}else{
block.className = "no";
obj.style.color = "";

}
}
//-->
</script>

阅读全文

与jquery手风琴源码相关的资料

热点内容
单片机基本概念 浏览:501
租什么服务器好又便宜 浏览:713
python爬虫必背知识 浏览:676
笔记本如何与片式服务器连接 浏览:721
组态王必须用加密狗吗 浏览:279
组装单片机对比度差 浏览:930
单片机按键控制程序 浏览:924
航海pdf 浏览:419
三根阴线选股指标源码 浏览:776
PDF编译base64位文件 浏览:589
app名字注册在哪里 浏览:399
华为方舟编译器和miui 浏览:480
matlab与python接口 浏览:838
怎么看加密市场 浏览:225
linux进程间通信管道 浏览:555
外圆圆弧槽左右切削怎么编程 浏览:384
做解压的实验 浏览:691
多人伪服务器怎么开荒 浏览:608
中兴交换机端口打开命令 浏览:975
编译原理vn集合 浏览:9