一个简单的树形菜单

一个简单的属性菜单
摘要由CSDN通过智能技术生成

树形菜单

一、效果图


二、页面
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>树形菜单</title>
		<link href="../css/tree.css" type="text/css" rel="stylesheet">
		<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
		<script src="../js/jquery-1.8.3.min.js"></script>
		<script src="../js/jquery-2.1.0.min.js"></script>
		<script src="../js/tree.js"></script>
	</head>

	<body>
		<div id="tree" style="width: 20%;"></div>
		<script type="text/javascript">
			var treeTestData = [{
				'menuName': "导航菜单",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-arrow-right'
			}, {
				'menuName': "用户管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-user',
				'menuChildData': [{
					'menuName': "老师管理",
					'menuUrl': "teacher.html",
					'menuLeftIcon': 'glyphicon glyphicon-user'
				}, {
					'menuName': "前台用户管理",
					'menuUrl': "teacher.html",
					'menuLeftIcon': 'glyphicon glyphicon-user'
				}, {
					'menuName': "后台用户管理",
					'menuUrl': "teacher.html",
					'menuLeftIcon': 'glyphicon glyphicon-user',
					'menuChildData': [{
						'menuName': "老师管理",
						'menuUrl': "teacher.html",
					}, {
						'menuName': "前台用户管理",
						'menuUrl': "teacher.html",
						'menuLeftIcon': 'glyphicon glyphicon-user'
					}, {
						'menuName': "后台用户管理",
						'menuUrl': "teacher.html",
						'menuLeftIcon': 'glyphicon glyphicon-user',
						'menuChildData': [{
							'menuName': "老师管理",
							'menuUrl': "teacher.html",
							'menuLeftIcon': 'glyphicon glyphicon-user'
						}, {
							'menuName': "前台用户管理",
							'menuUrl': "teacher.html",
							'menuLeftIcon': 'glyphicon glyphicon-user'
						}, {
							'menuName': "后台用户管理",
							'menuUrl': "teacher.html",
							'menuLeftIcon': 'glyphicon glyphicon-user'
						}]
					}]
				}]
			}, {
				'menuName': "广告管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-picture'
			}, {
				'menuName': "资讯管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-film'
			}, {
				'menuName': "角色管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-user'
			}, {
				'menuName': "模块管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-cog'
			}, {
				'menuName': "意见反馈管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-envelope'
			}, {
				'menuName': "礼物管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-gift'
			}, {
				'menuName': "房间管理",
				'menuUrl': "teacher.html",
				'menuLeftIcon': 'glyphicon glyphicon-calendar'
			}];

			$(function() {
				var tree = {
					'data': treeTestData,
					'clickIconBefore': 'glyphicon glyphicon-chevron-down',
					'clickIconAfter': 'glyphicon glyphicon-chevron-up'
				}
				getTree($("#tree"), tree);
			});
		</script>
	</body>

</html>

三、样式 tree.css
html,
body {
	padding: 0 0;
	margin: 0 0;
}

@media (min-width: 768px) {
	.nav-tabs.nav-justified> li> a {
		border-bottom: 1px solid #ddd;
		border-radi
  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值