js Tree error for function .jstree()

Monika D picture Monika D · Apr 4, 2013 · Viewed 16.5k times · Source

I am implementing a jstree in mvc4, but when I run my application no tree view is displayed. I have tried to track the error with Firebug and found the following error:

"TypeError: $(...).jstree is not a function $("#divtree").jstree();"

Answer

Nix picture Nix · Apr 4, 2013

Follow the guide on https://github.com/vakata/jstree

<script src="/path/to/jstree.min.js"></script>
<script>
    jQuery(function($) {
         ("#divtree").jstree();
    });
</script>