最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

使用js簡(jiǎn)單實(shí)現(xiàn)了tree樹(shù)菜單

 更新時(shí)間:2013年11月20日 15:37:58   投稿:whsnow  
使用js簡(jiǎn)單實(shí)現(xiàn)了樹(shù)菜單!具體實(shí)現(xiàn)實(shí)例代碼如下,相信自己你一定可以實(shí)現(xiàn)的更好

復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>tree</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.node ul{
margin-left:20px;
}
.node .node{
display:none;
}
.node .tree{
height:24px;
line-height:24px;
}
.ce_ceng_close{
background:url(images/cd_zd1.png) left center no-repeat;
padding-left: 15px;
}
.ce_ceng_open{
background:url(images/cd_zd.png) left center no-repeat;
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
</head>

<body>
<div class="cd_zj_l">


<div class="cd_title">目錄導(dǎo)航</div>
<div class="cv_fcv node">
<div style="clear:both"></div>
</ul>
</ul>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
$(".tree").each(function(index, element) {
if($(this).next(".node").length>0){
$(this).addClass("ce_ceng_close");
}
});
$(".tree").click(function(e){
var ul = $(this).next(".node");
if(ul.css("display")=="none"){
ul.slideDown();
$(this).addClass("ce_ceng_open");
ul.find(".ce_ceng_close").removeClass("ce_ceng_open");
}else{
ul.slideUp();
$(this).removeClass("ce_ceng_open");
ul.find(".node").slideUp();
ul.find(".ce_ceng_close").removeClass("ce_ceng_open");
}
});
</script>
</body>
</html>

使用js簡(jiǎn)單實(shí)現(xiàn)了樹(shù)菜單!相信自己你一定可以實(shí)現(xiàn)的更好

相關(guān)文章

最新評(píng)論

汝南县| 温宿县| 四子王旗| 二手房| 尚志市| 中方县| 桓台县| 留坝县| 昌图县| 桐柏县| 宁化县| 龙游县| 抚州市| 黄冈市| 土默特右旗| 陇川县| 江西省| 怀化市| 泌阳县| 健康| 岳阳县| 衡阳市| 随州市| 南漳县| 古田县| 祥云县| 定兴县| 汕头市| 拉萨市| 福建省| 双峰县| 安多县| 福鼎市| 青海省| 乌苏市| 翁源县| 贞丰县| 寻甸| 禄丰县| 前郭尔| 濉溪县|