Question

I'm using JQuery fancytree, and I got an error when I use drag'n drop. My project is using other extensions (like Filter, Child Counter) but dnd cannot be apply. I think that I got latest version of fancytree dnd js file (got it on github).

I register the fancytree files like that :

<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-->

And i register the extension like that :

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

And I have this error :

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

Could you help me please.

Was it helpful?

Solution

Get built version of fancytree from github and include dist/jquery.fancytree-all.min.js - from dist folder, not src.

Note that this is minimized so weights less, also you save 2 request for filter and dnd.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top