try to use this library in the widget:
GitHub - vakata/jstree: jquery tree plugin
Getting error on the jstree is not a function.
the library is referenced int he index.html
<!-- JStree -->
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://community.esri.com//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/themes/default/style.min.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/jstree.min.js"></script>
How to resolve this?
Thank you,
Have you followed this?
Use other libraries—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
I tired all these methods neither worked.
Putting it in the widget it self would stall widget load:
'jimu/loaderplugins/jquery-loader!https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.8/jstree.min.js',
Laurynas,
You can not use the jquery-loader to add a script like the jstree.min.js. Also you will not be able to use a cdn when adding trying to add the lib to the widget folder as method three recommends. What method 3 is saying is you add the actual *.js file to the widgets folder and then decalre it in the widget define array.
that get me further,loading thru jstree.js into widget. Getting error:
Now jQuery library does have to loaded using jquery-loader
Ye, its loaded. still giving this error:
Can you get jQuery to load properly if you comment out the jstree portion of the define?
JQuery loads properly if i comment out the jstree on the define.
Looks like the jstree has Jquery global already:
So you will have to require the jstree module in your widget after you know jQuery is loaded then. So in the widgets onOpen method you can add the jstree require.