JQuery - Fancytree无法应用扩展拖放

时间:2014-03-27 17:10:58

标签: jquery fancytree

我使用的是JQuery fancytree,当我使用drag' n drop时出现错误。我的项目正在使用其他扩展(如Filter,Child Counter),但dnd无法应用。我想我得到了最新版本的fancytree dnd js文件(在github上得到它)。

我注册了那样的fancytree文件:

<script src="Scripts/fancytree/src/jquery.fancytree.js"></script>
<script type="text/javascript" src="Scripts/fancytree/src/jquery.fancytree.filter.js"></script>
<script type="text/javascript" src="Scripts/fancytree/src/jquery.fancytree.dnd.js"></script>

<script src="Scripts/Treeview_navbar_dnd.js"></script><!--file where the fancytree code is-->

我注册了这样的扩展名:

$("#treeView").fancytree({
        extensions: ["filter","dnd"],

我有这个错误:

Uncaught Error: Could not apply extension 'dnd' (it is not registered, did you forget to include it?) 
你能帮帮我吗?

1 个答案:

答案 0 :(得分:0)

dist 文件夹中获取built version of fancytree from github并添加dist/jquery.fancytree-all.min.js - 而不是 src

请注意,这是最小化的,因此权重较小,您也可以节省2个过滤器和dnd的请求。