pep*_*dip 3 html jquery jstree
我是jQuery和jsTree的新手,我不知道为什么我不能让它工作?使用本教程:http: //tkgospodinov.com/jstree-part-1-introduction/
这个html/javascript:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="">
<title>
BLA BLA
</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--
<link rel="stylesheet" href="css/styles.css">
-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"> </script>
<script type="text/javascript" src="jquery.jstree.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#selector").jstree();
});
</script>
</head>
<body>
<div id="selector">
<ul>
<li><a>Team A's Projects</a>
<ul>
<li><a>Iteration 1</a>
<ul>
<li><a>Story A</a></li>
<li><a>Story B</a></li>
<li><a>Story C</a></li>
</ul>
</li>
<li><a>Iteration 2</a>
<ul>
<li><a>Story D</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
似乎没什么用.我收到以下错误:
$("#selector").jstree is not a function
Run Code Online (Sandbox Code Playgroud)
请检查参考以及如何调用它.此树应与您要查找的树完全相同.
其余所有文档的来源可以在这里找到:http://www.jstree.com/
<script type="text/javascript" src="http://static.jstree.com/v.1.0pre/jquery.jstree.js"></script>
Run Code Online (Sandbox Code Playgroud)
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<link rel="stylesheet" type="text/css" href="/css/normalize.css">
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<script type='text/javascript' src="http://static.jstree.com/v.1.0pre/jquery.jstree.js"></script>
Run Code Online (Sandbox Code Playgroud)