0
試圖在我的asp.net mvc 5項目中使用jsTree。但無法弄清楚它爲什麼不起作用?這裏也是小提琴鏈接。 https://dotnetfiddle.net/24h7Nm。jsTree的jquery插件不工作在mvc 5?
控制器: -
public ActionResult ShowTree()
{
return View();
}
查看: -
@{
ViewBag.Title = "ShowTree";
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.1.0/themes/default/style.min.css" rel="stylesheet" />
<script>
$(function() {
$("#divTree").jstree();
});
</script>
<h2>ShowTerms</h2>
<div id="divTree">
<ul>
<li>
Root node 11
<ul>
<li id="child_node_1">Child node 1</li>
<li>Child node 2</li>
</ul>
</li>
<li>Root node 2</li>
</ul>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jstree/3.1.0/jstree.min.js"></script>
<script src="~/Scripts/app.js"></script>