1

我正在使用 JQuery fancytree,当我使用拖放时出现错误。我的项目正在使用其他扩展(如过滤器、子计数器)但 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?) 

请问你能帮帮我吗。

4

1 回答 1

0

从 github获取构建版本的 fancytree并包含dist/jquery.fancytree-all.min.js- 从dist文件夹,而不是src

请注意,这是最小化的,因此重量更小,您还保存了 2 个过滤器和 dnd 请求。

于 2014-04-03T12:19:43.357 回答