jquery.treeview的实现

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!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>
	<base href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/"/>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>PMES流程管理引擎系统</title>
	
	<link rel="stylesheet" href="jquery/treeview/jquery.treeview.css" />
	<script src="jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
	<script src="jquery/treeview/lib/jquery.cookie.js" type="text/javascript"></script>
	<script src="jquery/treeview/jquery.treeview.js" type="text/javascript"></script>
	
	<script type="text/javascript">
	$(document).ready(function(){
		$("#browser").hide().load("${pageContext.request.contextPath}/demo.jsp", function() {
			$("#browser").fadeIn(3000).treeview();	
		});
	});
	</script>
	</head>
	<body>
	<ul id="browser" class="filetree">
	</ul>
 
</body></html>
 
<li class="expandable lastExpandable"><div class="hitarea expandable-hitarea lastExpandable-hitarea"></div><span class="folder">Folder 1</span>
			<ul style="display: none;">
				<li class="expandable"><div class="hitarea expandable-hitarea"></div><span class="folder">Item 1.1</span>
					<ul style="display: none;">
						<li class="last"><span class="file">Item 1.1.1</span></li>
					</ul>
				</li>
				<li class="expandable"><div class="hitarea expandable-hitarea"></div><span class="folder">Folder 2</span>
					<ul style="display: none;">
						<li class="expandable"><div class="hitarea expandable-hitarea"></div><span class="folder">Subfolder 2.1</span>
							<ul style="display: none;" id="folder21">
								<li><span class="file">File 2.1.1</span></li>
								<li class="last"><span class="file">File 2.1.2</span></li>
							</ul>
						</li>
						<li class="collapsable lastCollapsable"><div class="hitarea collapsable-hitarea lastCollapsable-hitarea"></div><span class="folder">Subfolder 2.2</span>
							<ul>
								<li><span class="file">File 2.2.1</span></li>
								<li class="last"><span class="file">File 2.2.2</span></li>
							</ul>
						</li>
					</ul>
				</li>
				<li class="closed expandable"><div class="hitarea closed-hitarea expandable-hitarea"></div><span class="folder">Folder 3 (closed at start)</span>
					<ul style="display: none;">
						<li class="last"><span class="file">File 3.1</span></li>
					</ul>
				</li>
				<li class="last"><span class="file">File 4</span></li>
			</ul>
		</li>
 

你可能感兴趣的:(Jquery treeview)